Ka'b ibn Asad was the chief of the Qurayza, a Jewish tribe that lived in Medina until 627. A tribesman, Al-Zabir ibn Bata, claimed that his face "was like a Chinese mirror, in which the girls of the tribe could see themselves", presumably meaning that Kaab had a youthful and innocent appearance.
In 617 the pagan tribes of Medina, the Khazraj and the Aws, were in conflict. The Aws asked the Qurayza and the Nadir for assistance. The Khazraj heard about it and demanded for the Jews to send 40 hostages as a pledge of their neutrality. Once they had the hostages in their power, the Khazraj then threatened to kill them unless the Jews handed their lands over to the Khazraj. Some of the Jews were willing to submit, but Ka'b insisted that they should not sacrifice their ancestral homes and so most of the hostages were killed. As a result, the Qurayza and the Nadir allied themselves with the Aws. That led to the Battle of Bu'ath, in which the Aws narrowly defeated the Khazraj.
When the Islamic prophet Muhammad arrived in Medina in 622, Ka'b bound himself to the Constitution of Medina on behalf of his tribe. Among other conditions, he agreed that each tribe would bear its own expenses, there would be freedom of religion, acts of violence and injustice would be punished, all tribes would unite to defend Medina against an outside attack and unresolved disputes would be referred to Muhammad.
Shortly afterwards, the Qurayza in fact referred a legal case to Muhammad. Ka'b apparently used this as an opportunity to test Muhammad's claim to be a prophet. He reminded Muhammad that he was a rabbi and a leader among his people, who would be sure to follow his example if he became a Muslim. He offered to recognise Muhammad's prophethood if he would settle the case in favour of the Qurayza. A man who accepted the bribe would presumably betray himself as a false prophet. However, Muhammad did not fall into the trap but announced: "If thou judgest, judge in equity, for Allah loveth those who deal fairly".
The lawsuit in question was a dispute about blood money. According to Ibn Ishaq, a Qurayza had slain some Nadir noblemen and wanted to pay only half the usual blood money. (It appears that for historical reasons, the Qurayza usually paid the Nadir usually double the blood money that the Nadir paid to them.) Muhammad settled it by decreeing that both tribes should pay equal fines. According to Abu Daw’ud, writing a century later, the situation was that a Nadir had killed a Qurayza. The custom was that a Qurayza who killed a Nadir was killed but a Nadir who killed a Qurayza paid blood money. In the lawsuit, the Qurayza demanded capital punishment for the Nadir, but the Nadir went to Muhammad to plead their right to pay blood money, as usual. Muhammad decreed "a life for a life" on the grounds that judgments based on situations from the days of paganism were no longer relevant.