(people of Medina) suffered heavy losses, and Muhammad was injured. Battle of the Trench In 627, Abu Sufyan led another force toward Medina. Knowing of his intentions, Muhammad asked for proposals for defending the northern flank of the city, as the east and west were protected by volcanic rocks and the south was covered with palm trees. Salman al-Farsi, a Persian Sahabi who was familiar with Sasanian war tactics recommended digging a trench to protect the city and Muhammad accepted it. The subsequent siege came to be known as the Battle of the Trench and the Battle of the Confederates. After a month-long siege and various skirmishes, the Meccans withdrew again due to the harsh winter. During the siege, Abu Sufyan contacted the Jewish tribe of Banu Qurayza and formed an agreement with them, to attack the Muslim defenders and effectively encircle the defenders. It was however discovered by the Muslims and thwarted. This was in breach of the Constitution of Medina and after the Meccan withdrawal, Muhammad immediately marched against the Qurayza and laid siege to their strongholds. The Jewish forces eventually surrendered. Some members of the Aws negotiated on behalf of their old allies and Muhammad agreed to appoint one of their chiefs who had converted to Islam, Sa'd ibn Mu'adh, as judge. Sa'ad judged by Jewish law that all male members of the tribe should be killed and the women and children enslaved as was the law stated in the Old Testament for treason in the Book of Deutoronomy. This action was conceived of as a defensive measure to ensure that the Muslim community could be confident of its continued survival in Medina. The French historian Robert Mantran proposes that from this point of view it was successful—from this point on, the Muslims were no longer primarily concerned with survival but with expansion and conquest. In the ten years following the hijra, Medina formed the base from which Muhammad and the Muslim army attacked and were attacked, and it was from here that he marched on Mecca, entering it without battle in 630. Despite Muhammad's tribal connection to Mecca, the growing importance of Mecca in Islam, the significance of the Ka'bah as the center of the Islamic world, as the direction of prayer (Qibla), and in the Islamic pilgrimage (Hajj), Muhammad returned to Medina, which remained for some years the most important city of Islam and the