The Prophet's ﷺ arrival at Qubaʾ and the founding of the first mosque
The blessed journey of the Hijra ended with the Prophet ﷺ and his companion reaching Qubaʾ on the outskirts of Madinah, where he stayed among Banu ʿAmr ibn ʿAwf and founded the Mosque of Qubaʾ — the first mosque built in Islam, founded upon piety.
The people of Yathrib would go out each morning to the harra to await the Hijra caravan until the sun's heat sent them back. When the caravan appeared, a Jewish man climbed up and cried: O Banu Qayla, this is your grandfather whom you await! The Muslims rushed to arms in joy and welcome.
He ﷺ stayed at Qubaʾ among Banu ʿAmr ibn ʿAwf, as the guest of Kulthum ibn al-Hadm, and spent several nights there in which he founded the Mosque of Qubaʾ, of which Allah said: "A mosque founded on piety from the first day is more worthy that you stand in it." He worked in its building with his own noble hands.
Then, on Friday, he rode to Madinah, and the prayer overtook him among Banu Salim, where he led the first Jumuʿa. He entered Madinah as the people cried: The Prophet of Allah has come! The day of his arrival was the brightest in its history, and the year of the Hijra became the epoch of the Ummah's calendar.
Note — differing reports on the date: The well-known view is that he reached Qubaʾ on Monday 8 Rabiʿ al-Awwal and entered Madinah on Friday the 12th; the reports differ between the 8th and the 12th.