Ubadah ibn al-Samit RA was a Companion of the Khazraj and one of the twelve men of the First Pledge of Aqabah, which he called "the pledge of the women" because it was purely a pledge of faith and morality. Before Islam he was one of the two chief Khazraj allies of the Banu Qaynuqa'. When they broke their treaty after Badr, he renounced the alliance before the Prophet ﷺ, choosing Allah, His Messenger ﷺ and the believers, and verses of Surah al-Ma'idah are connected to him. He oversaw their departure from Madinah.
All 2 events
Took the First Covenant of Aqaba (Bay'at al-Aqaba al-Ula)
إِنَّمَا وَلِيُّكُمُ ٱللَّهُ وَرَسُولُهُۥ وَٱلَّذِينَ ءَامَنُوا۟ ٱلَّذِينَ يُقِيمُونَ ٱلصَّلَوٰةَ وَيُؤْتُونَ ٱلزَّكَوٰةَ وَهُمْ رَٰكِعُونَ
“Your only guardians are Allah, His Messenger, and fellow believers — who establish prayer and pay zakat with humility.”
As his own bio notes, Allah praised Ubadah ibn al-Samit RA directly in this ayah for renouncing his alliance with Banu Qaynuqa in favor of Allah and His Messenger ﷺ.
وَمَن يَتَوَلَّ ٱللَّهَ وَرَسُولَهُۥ وَٱلَّذِينَ ءَامَنُوا۟ فَإِنَّ حِزْبَ ٱللَّهِ هُمُ ٱلْغَـٰلِبُونَ
“Whoever allies themselves with Allah, His Messenger, and fellow believers, then it is certainly Allah's party that will prevail.”
As his own bio notes, Allah praised Ubadah ibn al-Samit RA directly in this ayah for renouncing his alliance with Banu Qaynuqa in favor of Allah and His Messenger ﷺ.