It has been reported on the authority of Barra' who said
The Messenger of Allah (ﷺ) was carrying the earth with us on the Day of Ahzab and the whiteness of his belly had been covered with earth. (While engaged in this toil) he was reciting: By God, if Thou hadst not guided us We would have neither been guided aright nor practised charity, Nor offered prayers. Descend on us peace and tranquillity. Behold I these people (the Meccans) refused to follow us. According to another version, he recited: The chieftains (of the tribes) refused to follow us When they contemplated mischief, we rejected it. And with this (verse) he would raise his voice.
It has been narrated on the authority of Abu Ishaq who said
I heard from Bara' a similar tradition except that he said:" These people (the Meccans) rebelled against us."
It has been reported on the authority of Sahl b. Sa'd who said
The Messenger of Allah (ﷺ) came to us while we were digging the ditch and were carrying the earth on our shoulders. (Seeing our condition), he said: O God, there is no life but the life of the Hereafter. So forgive Thou the Muhajirs and the Ansar.
It has been narrated on the authority of Anas b. Malik that the Messenger of Allah (ﷺ) said
O God, there is no life, but the life of the Hereafter, So forgive Thou the Ansar and the Muhajirs.
According to another version of the tradition, reported on the authority of Anas b. Malik, the Messenger of Allah (may peace he upon him) is reported to have said
O God, there is no life but the life of the Hereafter, So grant honour to the Ansar and the Muhajirs.
According to still another version of the tradition narrated by the same authority, and handed down through a different chain of transmitters, it has been reported that they (the Companions of the Holy Prophet) were reciting rajaz verses and the Messenger of Allah (ﷺ) was (reciting) with them. And they were chanting
O God, there is no good but the good of the Hereafter. So help Thou the Ansar and the Muhajirs. Shaiban substituted" So forgive Thou" for" So help Thou".
It has been narrated (through a still difterent chain of transmitters) by Anas that the Companions of Muhammad (ﷺ) were chanting on the day of the Battle of the Ditch
We are those who have sworn allegiance to Muhammad (And made a covenant with him) to follow Islam as long as we live. Hammad is not sure whether Anas said:" Ala'l-Islam" or," Ala'l-Jihad". And the Prophet (ﷺ) was chanting: O God, the real good is the good of the Hereafter, So forgive Thou the Ansar and the Muhajirs.