Sayyiduna Abu Jarwal Zuhayr bin Surad (may Allah be pleased with him) narrates: When the Messenger of Allah took us captive on the occasion of the Battle of Hunayn, the day of the battle with Hawazin, and began separating the captives and the sheep and goats, I came to him and began reciting these verses: "O Messenger of Allah, bestow your favour upon us with generosity, for you are the man in whom we place our hope and for whose (kindness) we wait. Bestow your favour upon a community that destiny has held back, whose unity has been scattered and whose circumstances time has changed. Time has left us crying out in grief, with intense sorrow and distress upon their hearts, if you do not come to their aid by spreading mercy, O you who, when put to the test, are the weightiest of people in forbearance. Be kind to the women whose milk you drank, for pure milk filled your mouth from their milk, when you were a small child and used to drink their milk, when what they brought and what they left pleased you. Do not make us like one whose unity has been scattered, and let us remain, for we are a radiant people; we are grateful for blessings when they are met with ingratitude, and after this day too we have a store (of gratitude). So grant pardon to those among whom you were nursed, among whom are your (foster) mothers, for pardon becomes renowned. O best of those with whom the bay steeds find ease at the time of battle, as long as (its) sparks keep blazing, we hope for pardon from you. You have been given the title 'Guide of creation', because you pardon and you help. So pardon; may Allah Almighty on the Day of Resurrection keep you safe from the things you wish to be safe from, and grant you success." When the Prophet (peace and blessings be upon him) heard these verses, he said: "Whatever falls to my share and to the share of the Banu Abd al-Muttalib is yours." Quraysh said: "Whatever falls to our share belongs to Allah and His Messenger." The Ansar said: "Whatever falls to our share belongs to Allah and His Messenger."
Al-Tabarani recorded it in all three of his books, and its chain contains narrators whom I do not know.