Sahih Muslim Book 19, Hadith Number 4444.

Chapter : The battle of Ahzab or Khandaq (the tribes or the ditch).

It has been reported on the authority of Sahl b. Sa’d who said: The Messenger of Allah (may peace be upon him) 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.