Sayyiduna Qays bin Asim (may Allah be pleased with him) narrates that he asked the Prophet (peace and blessings be upon him) about making alliances, and the Prophet (peace and blessings be upon him) said: "Whatever such alliance was made in the Days of Ignorance, hold firmly to it; but there is no such alliance in Islam."
Imam Ahmad recorded it, and Imam al-Tabarani also recorded it.