Sahih Bukhari Volume 4, Book 52, Hadith Number 281.
Narrated Az-Zuhri: ‘Ubaidullah bin ‘Iyyad said that the daughter of Al-Harith had told him, “When those people gathered (to kill Khubaib) he borrowed a razor from me to shave his pubes and I gave it to him. Then he took a son of mine while I was unaware when he came upon him. I saw him placing my son on his thigh and the razor was in his hand. I got scared so much that Khubaib noticed the agitation on my face and said, ‘Are you afraid that I will kill him? No, I will never do so.’ By Allah, I never saw a prisoner better than Khubaib. By Allah, one day I saw him eating of a bunch of grapes in his hand while he was chained in irons, and there was no fruit at that time in Mecca.” The daughter of Al-Harith used to say, “It was a boon Allah bestowed upon Khubaib.” When they took him out of the Sanctuary (of Mecca) to kill him outside its boundaries, Khubaib requested them to let him offer two Rakat (prayer). They allowed him and he offered Two Rakat and then said, “Hadn’t I been afraid that you would think that I was afraid (of being killed), I would have prolonged the prayer. O Allah, kill them all with no exception.” (He then recited the poetic verse): “I being martyred as a Muslim, Do not mind how I am killed in Allah’s Cause, For my killing is for Allah’s Sake, And if Allah wishes, He will bless the amputated parts of a torn body” Then the son of Al Harith killed him. So, it was Khubaib who set the tradition for any Muslim sentenced to death in captivity, to offer a two-Rak’at prayer (before being killed). Allah fulfilled the invocation of Asim bin Thabit on that very day on which he was martyred. The Prophet informed his companions of their news and what had happened to them. Later on when some infidels from Quraish were informed that Asim had been killed, they sent some people to fetch a part of his body (i.e. his head) by which he would be recognized. (That was because) ‘Asim had killed one of their chiefs on the day (of the battle) of Badr. So, a swarm of wasps, resembling a shady cloud, were sent to hover over Asim and protect him from their messenger and thus they could not cut off anything from his flesh.