Anas bin Malik reported,

The Messenger of Allah ﷺ established a pact of brotherhood between the Emigrants and the Helpers in our house.Someone said to him, "Did the Messenger of Allah ﷺ not say that there is no pact-making in Islam?"He replied, "The Messenger of Allah ﷺ established a pact between the Emigrants and the Helpers in our house," repeating it two or three times.

Abu Dawud 2926

Sahih

حدثنا مسدد حدثنا سفيان عن عاصم الأحول قال سمعت

أنس بن مالك يقول

حالف رسول الله ﷺ بين المهاجرين والأنصار في دارنا فقيل له أليس قال رسول الله ﷺ لا حلف في الإسلام فقال حالف رسول الله ﷺ بين المهاجرين والأنصار في دارنا مرتين أو ثلاثا

أبو داود 2926صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Obligatory duties
Chapter
Swearing
Numbering
Darussalam 2926
Abu Dawud 2926