Immediately after arriving in Medina, Muhammad wrote a covenant for all the people of the city. It stated that "any dispute or controversy…must be referred to Allah and to Muhammad the apostle of Allah". Muhammad considered himself the new ruler of the city and built its first mosque.
The Jewish rabbis, rather then accepting Muhammad as their prophet and leader, began to criticize him. Many of the Aus and Khazraj converts joined them and became known as the hypocrites. They had initially accepted Islam, but did not really believe Muhammad. The next few hundred pages of the history books and many chapters of the Quran are devoted to Muhammad's arguing with the Jews, trying to persuade them to accept him as a prophet. He claimed they had removed passages of the Torah that prophesied his coming, and warned the Muslims against taking Jews as friends. His language became more strident, with the Quran on three different occasions recording his accusation that Allah had changed the Jews into monkeys and pigs. He also speculated that Allah had turned some of them into rats.
A Jewish couple committed adultery and Muhammad asked the rabbis if the law of Moses called for the stoning of adulterers. The rabbis acknowledged it did, but said they did not do this anymore. Muhammad said he would revive that law. The couple was stoned to death at the door of the mosque, the man leaning over the woman trying to protect her from the stones as they died.
Islam quickly became powerful, with Muhammad and his warriors robbing trade caravans to finance the new community. Following a victory against the Quraysh at the Battle of Badr in which many Meccans were killed, Muhammad warned the Jews of the Qaynuqa tribe they would suffer the same fate unless they converted to Islam. One of their Medinan allies pleaded with Muhammad to expel them from the city rather than kill them. Although Muhammad "became so angry his face almost turned black", he agreed to let the Jews live. They left the city, leaving behind their property to be possessed by the Muslims.
A Jewish poet named Ka'b Al-Ashraf wrote poems criticizing Muhammad's killing two Arab leaders. When Muhammad heard of it, he sent Bin Maslama to kill the poet. After murdering him, Bin Maslama boasted that the attack had cast terror among the Jews and there was not a Jew in Medina who did not fear for his life. One hundred year old poet Abu Afak and the poetess Asma Bint Marwan, mother of five young children, were also killed at Muhammad's command for writing poetry critical of him.
Muhammad then ordered the Muslims to kill any Jew who fell into their power. A Muslim named Muhayisa killed a Jewish merchant named Ibn Sunayna who had for a long time been his friend and business associate. When Muhayisa's brother asked why he had killed the Jew, Muhaysiya replied he would kill the brother also if Muhammad told him to.
Following the Battle of Uhud, which was the next major confrontation between the Muslims and the Quraysh, Muhammad went to the second Jewish tribe of Medina, the Al-Nadir, to arrange financial compensation for some people who had been killed. Muhammad then quickly left, claiming Allah had told him the Al-Nadir wanted to kill him. He gathered his army, burned the fields of the Jews, and then surrounded them. When they pleaded for their lives, Muhammad agreed to let them live provided they leave with only what their camels could carry. The Jews agreed and were banished, some going to Khaybar about 100 miles away, and the rest to Syria.
The remaining Jewish tribe in Medina, the Qurayza, realized their turn would be next and tried to gain support from Muhammad's enemies in Mecca. The Quraysh came out to fight, but Muhammad dug a trench around Medina preventing them from approaching the city. The angel Gabriel then asked Muhammad if he was going to attack the Qurayza. When he replied he had finished fighting, Gabriel informed him that Allah was not finished. Muhammad approached the Jews and, addressing them as "brothers of monkeys", said Allah was bringing his vengeance upon them. He besieged them for 21 days until they surrendered. He then dug ditches and beheaded every male Jew who had reached the age of puberty, throwing their heads into the ditches. Arab historians say the number killed was between 600 and 900 men. Their land and property were taken by the Muslims, with the women and children divided up as slaves.
The Jews had lived in Medina for well over a thousand years. They were the educated artisans and merchants of the city. Within five years of Muhammad's arrival, they were all exiled, enslaved, or slaughtered. Although Muslims justify Muhammad's treatment of the Jews by incidents such as his claiming the Al-Nadir wanted to kill him, and the Qurayza seeking help from the Quraysh, the truth is that their fate was sealed simply by not accepting him as a prophet.