Jabir bin Abdullah reported,

This verse was revealed concerning us, "When two parties among you were about to lose heart" [Aal Imran 3:122], referring to Banu Salama and Banu Haritha. I would not wish that it had not been revealed, for Allah says, "And Allah was their protector" [Aal Imran 3:122].

Bukhari 4051

Sahih

حدثنا محمد بن يوسف عن ابن عيينة عن عمرو

عن جابر رضي الله عنه قال

نزلت هذه الآية فينا {إذ همت طائفتان منكم أن تفشلا} بني سلمة وبني حارثة وما أحب أنها لم تنزل والله يقول {والله وليهما}

البخاري 4051صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
When two parties among you were about to lose heart, but Allah was their protector, and upon Allah let the believers rely
Numbering
Darussalam 4051
Bukhari 4051