On the day of the Trench, the Ansar were chanting, "We are the ones who pledged allegiance to Muhammad, to strive in jihad as long as we live, forever."He replied to them, "O Allah, there is no life but the life of the Hereafter, so honor the Ansar and the Muhajirun."
كانت الأنصار يوم الخندق تقول: نحن الذين بايعوا محمدا- على الجهاد ماحيينا أبدا فأجابهم: اللهم لا عيش إلا عيش الآخرة، فأكرم الأنصار والمهاجره.
Bukhari reported it in the Merits of the Ansar (3796), from Adam, who said, Shuba narrated to us, from Humayd al-Tawil, I heard Anas bin Malik say, and he mentioned it.Muslim also reported it in Jihad and Expeditions (128:1805), through several chains, from Muhammad bin Jafar, who said, Shuba informed us, from Qatada, from Anas bin Malik, that the Messenger of Allah ﷺ used to say, "O Allah, true life is the life of the Hereafter." Shuba said, or he said, "O Allah, there is no life but the life of the Hereafter, so honor the Ansar and the Muhajireen."