Sahih Bukhari Volume 006, Book 060, Hadith Number 089.
Narrated By Usama bin Zaid : Allah's Apostle rode a donkey, equipped with a thick cloth-covering made in Fadak and was riding behind him. He was going to pay visit to Sad bin Ubada in Banu Al-Harith bin Al-Khazraj; and this incident happened before the battle of Badr. The Prophet passed by a gathering in which 'Abdullah bin Ubai bin Salul was present, and that was before 'Abdullah bin Ubai embraced Islam. Behold in that gathering there were people of different religions: there were Muslims, pagans, idol-worshippers and Jews, and in that gathering 'Abdullah bin Rawaha was also present. When a cloud of dust raised by the donkey reached that gathering, 'Abdullah bin Ubai covered his nose with his garment and then said, "Do not cover us with dust." Then Allah's Apostle greeted them and stopped and dismounted and invited them to Allah (i.e. to embrace Islam) and recited to them the Holy Qur'an. On that, 'Abdullah bin Ubai bin Saluil said, "O man ! There is nothing better than that what you say. If it is the truth, then do not trouble us with it in our gatherings. Return to your mount (or residence) and if somebody comes to you, relate (your tales) to him." On that 'Abdullah bin Rawaha said, "Yes, O Allah's Apostle! Bring it (i.e. what you want to say) to us in our gathering, for we love that."
So the Muslims, the pagans and the Jews started abusing one another till they were on the point of fighting with one another. The Prophet kept on quietening them till they became quiet, whereupon the Prophet rode his animal (mount) and proceeded till he entered upon Sad bin Ubada. The Prophet said to Sad, "Did you not hear what 'Abu Hub-b said?" He meant 'Abdullah bin Ubai. "He said so-and-so." On that Sad bin Ubada said, "O Allah's Apostle! Excuse and forgive him, for by Him Who revealed the Book to you, Allah brought the Truth which was sent to you at the time when the people of this town (i.e. Medina) had decided unanimously to crown him and tie a turban on his head (electing him as chief). But when Allah opposed that (decision) through the Truth which Allah gave to you, he (i.e. 'Abdullah bin Ubai) was grieved with jealously. and that caused him to do what you have seen." So Allah's Apostle excused him, for the Prophet and his companions used to forgive the pagans and the people of Scripture as Allah had ordered them, and they used to put up with their mischief with patience. Allah said: "And you shall certainly hear much that will grieve you from those who received the Scripture before you and from the pagans...'(3.186) And Allah also said: "Many of the people of the Scripture wish if they could turn you away as disbelievers after you have believed, from selfish envy..." (2.109)
So the Prophet used to stick to the principle of forgiveness for them as long as Allah ordered him to do so till Allah permitted fighting them. So when Allah's Apostle fought the battle of Badr and Allah killed the nobles of Quraish infidels through him, Ibn Ubai bin Salul and the pagans and idolaters who were with him, said, "This matter (i.e. Islam) has appeared (i.e. became victorious)." So they gave the pledge of allegiance (for embracing Islam) to Allah's Apostle and became Muslims.