When the polytheists pressed hard against the Prophet ﷺ, who was with seven men from the Ansar and two men from Quraysh, he said, "Who will drive them back from us, and he will be my companion in Paradise?"A man from the Ansar came forward and fought until he was killed. When they pressed hard against him again, he said, "Who will drive them back from me, and he will be my companion in Paradise?"This continued until all seven were killed. The Messenger of Allah ﷺ then said to his two remaining companions, "We have not been fair to our brothers."
حدثنا عفان حدثنا حماد أخبرنا ثابت وعلي بن زيد
أن المشركين لما رهقوا النبي ﷺ وهو في سبعة من الأنصار ورجلين من قريش قال من يردهم عنا وهو رفيقي في الجنة فجاء رجل من الأنصار فقاتل حتى قتل فلما أرهقوه أيضا قال من يردهم عني وهو رفيقي في الجنة حتى قتل السبعة فقال رسول الله ﷺ لصاحبه ما أنصفنا إخواننا
Its isnad is sahih, coming through Thabit, and hasan through Ali bin Zayd. The hadith was narrated by Muslim, 3/1415, no. 1789, in the book of jihad, the Battle of Uhud, and by Bayhaqi, 9/44, in the book of expeditions, on one who volunteers to expose himself to being killed.