The Story of Building the Mosque
Abū al-Tiyāḥ narrated from Anas: The Messenger of Allah ﷺ sent for the notables of Banū al-Najjār. When they arrived he said, “O Banū al-Najjār, sell me this enclosed plot of yours.” They replied, “By Allah, we ask no price for it except from Allah.” The plot, as I am describing to you, contained graves of polytheists, some ruined ground, and a number of date palms. The Messenger of Allah ﷺ ordered that the graves of the polytheists be exhumed, the uneven ground levelled, and the palms cut down. The trunks were then laid in rows facing the qiblah, the two door-posts were set with stones, and the Companions began to haul stones while chanting lines of verse, the Messenger of Allah ﷺ working alongside them and saying:
“O Allah, no goodness is there save the goodness of the Hereafter; so grant victory to the Anṣār and the Muhājirūn.”
Agreed upon. In another wording: “so forgive the Anṣār.”
Mūsā ibn ʿUqbah related from Ibn Shihāb that, in the account of building the mosque, the Prophet ﷺ and his Companions started carrying adobe bricks, and while doing so he said:
“This burden is not the burden of Khaybar; this is more virtuous and purer in our Lord’s sight.”
He also said:
“O Allah, no goodness is there save the goodness of the Hereafter; so have mercy on the Anṣār and the Muhājirūn.”
Ibn Shihāb added: “The Messenger of Allah ﷺ quoted poetry composed by one of the Muslim men whose name is not mentioned in the report, and I have not learned from any narration that the Messenger of Allah ﷺ ever quoted any lines of poetry other than these.”