(Allah verily made good His promise unto you…) [3:152].
Said Muhammad ibn Ka‘b al-Qurazi: “When the Messenger of Allah, Allah bless him and give him peace, returned to Medina after that with which they were afflicted at Uhud, some of his Companions said: ‘From whence did this come to us when Allah has promised us victory?’ And so Allah, exalted is He, revealed this verse (Allah verily made good His promise unto you) up to His saying (Some of you desired the world…), i.e. the marksmen who did what they did at Uhud”.
Asbab Al-Nuzul by Al-Wahidi , trans. Mokrane Guezzou