The Muslim State in Madinah
The new community in Madinah set about the business of living, farming, and freely practicing their faith. For the first time, the Muslims could organize society the way they believed it should be, in accordance with the guidance that Muhammad continued to receive from God. The community built a mosque for prayer, established societal rules, and set aside old tribal struggles and blood feuds.
Peace Treaties and Alliances
Shortly after arriving in Madinah, Muhammad invited representatives from neighboring tribes — Jews, Christians, and others — to discuss the idea of establishing a city-state in Madinah. With their approval, Muhammad established the first written constitution, which defined his role as leader of the community and the rights and duties of all citizens. The constitution established a justice system and laid down the principles of foreign policy and defense. All citizens, Muslim and non-Muslim, were afforded equality in practical affairs, and everyone enjoyed full freedom of religion.
Muhammad traveled to other cities and tribes in the area to engage them in treaties of alliance. As the alliance grew stronger, they decided to bring pressure upon the Meccans to return the confiscated property of the Muslims. The alliance began to interrupt Meccan trade caravans through the region of Madinah. At the same time, the Meccans continued to threaten and harass them, so the Muslims fortified themselves against possible attack.
The Battles of Badr and Uhud
Angered by their unsuccessful attempts to stop Muhammad and the disruption of their commerce, the tribes of Mecca sent an ultimatum to Madinah demanding that Muhammad and his followers surrender or be ousted from the area. When their demands went unheeded, they organized an army to descend on Madinah. In the Battle of Badr, the Muslims miraculously came out victorious over a Meccan army three times their size. The Meccan prisoners of war were allowed to ransom themselves for as little as the price of a necklace. For some literate prisoners, their ransom was to teach ten Muslim children how to read and write.
After another year of preparation, the Meccans attempted to avenge their defeat at Badr by descending on Madinah again, this time with an army of thousands. In the Battle of Uhud, the Muslims put up a strong effort and looked to be victorious against an army four times its size. However, some Muslim archers left their posts prematurely, and the Meccans found their advantage. They swooped in from behind and surrounded the Muslims. Muhammad himself was injured in the fierce fighting, and many Muslims were killed. Finally, what remained of the Muslim army managed to reach safety in the hills.
Widows and Orphans
It was during this period of defense and bloodshed that Muhammad entered into marriage contracts with several women, all but one of whom were widowed by war. As leader of the community, Muhammad had a responsibility to set an example and care for the widows and their children. Muhammad did marry one woman who was not a widow. Her name was Aisha, the daughter of Muhammad's closest companion, Abu Bakr.
Betrayals and Consequences
The alliances that Muhammad had forged with various tribes were very important during the period when the Madinah community was under constant attack. Eventually, however, a few tribes that had joined the alliance began to incite trouble. When they saw the strength of the Meccans, they secretly pledged their support to them, spied for them, and in one case even plotted to assassinate Muhammad. In response, Muhammad demanded that those tribes take their belongings and leave the area.
Aisha's age at the time of marriage is the subject of much dispute. According to some accounts, the marriage was contracted when Aisha was a young girl. However, the wedding did not take place until the second year after hijrah. The most reliable reports indicate that Aisha was then a young woman in her late teens or early twenties.
The tribes that left the Madinah alliance mobilized with the Meccans and other tribes surrounding Madinah. They planned to invade Madinah with a force much greater than they had during the battles of Badr and Uhud. In response, the Muslims decided to dig a ditch around the whole city, which successfully helped to protect them from the siege. This encounter became known as the Battle of the Ditch.