The Messenger of Allah ﷺ said, "There is no alliance in Islam, but any alliance made during the days of ignorance is only strengthened by Islam."
حدثنا عثمان بن أبي شيبة حدثنا محمد بن بشر وابن نمير وأبو أسامة عن زكريا عن سعد بن إبراهيم عن أبيه
قال رسول الله ﷺ لا حلف في الإسلام وأيما حلف كان في الجاهلية لم يزده الإسلام إلا شدة
Muslim narrated it in the Book of the Virtues of the Companions, chapter on the Prophet's ﷺ pairing of his companions, may Allah be pleased with them, in brotherhood, hadith no. 2530, from the hadith of Ibn Numayr with this wording.