The Prophet Muhammad (PBUH) and his followers arrived in Madinah in 622 CE, marking a pivotal moment in Islamic history. Their journey ended in the village of Quba, on the outskirts of Madinah, where they were warmly welcomed by the local tribes. Here, the Prophet stayed for a few days and initiated the construction of the first mosque in Islam, known as the Quba Mosque. This mosque not only served as a place of worship but also symbolized the foundation of the Muslim community in a new land.
After his short stay in Quba, the Prophet proceeded to the heart of Madinah, where he was received with great enthusiasm by its inhabitants, the Ansar, or Helpers. He was offered hospitality by many, but he chose to stay with Abu Ayyub al-Ansari, a respected resident of the city. This choice was made in a manner that emphasized humility and equality, as the Prophet allowed his camel to wander freely and rest where it would, signifying divine guidance in his selection of a host.
One of the Prophet's first acts in Madinah was to build a mosque, which would become the center of the newly formed Muslim community. This mosque, later known as the Prophet's Mosque, served not only as a place of prayer but also as a community center, court, and school. It was here that the Prophet laid the foundation for the social and spiritual life of the community.
In addition to establishing the mosque, the Prophet initiated the practice of pairing each Emigrant (Muhajir) with a Helper (Ansar). This brotherhood aimed to foster unity and support among the diverse members of the nascent Muslim society. By creating these bonds, the Prophet ensured that the Emigrants, who had left behind their homes and possessions in Mecca, were integrated and supported in their new environment.