Sahih al-Bukhari Book 87, Hadith 12
I was among those Naqibs (selected leaders) who gave the Pledge of allegiance to Allah's Messenger (ﷺ). We
gave the oath of allegiance, that we would not join partners in worship besides Allah, would not steal,
would not commit illegal sexual intercourse, would not kill a life which Allah has forbidden, would
not commit robbery, would not disobey (Allah and His Apostle), and if we fulfilled this pledge we
would have Paradise, but if we committed any one of these (sins), then our case will be decided by
Allah.
Allah's Messenger (ﷺ) sent us (to fight) against Al-Huraqa (one of the sub-tribes) of Juhaina. We reached those people in the morning and defeated them. A man from the Ansar and I chased one of their men and when we attacked him, he said, "None has the right to be worshipped but Allah." The Ansari refrained from killing him but I stabbed him with my spear till I killed him. When we reached (Medina), this news reached the Prophet. He said to me, "O Usama! You killed him after he had said, 'None has the right to be worshipped but Allah?"' I said, "O Allah's Messenger (ﷺ)! He said so in order to save himself." The Prophet (ﷺ) said, "You killed him after he had said, 'None has the right to be worshipped but Allah." The Prophet (ﷺ) kept on repeating that statement till I wished I had not been a Muslim before that day.
The Prophet (ﷺ) said, "Whoever carries arms against us, is not from us."