His cause was warmly espoused by the inhabitants of
Medina
. With the character of a lawgiver , a moral teacher , and also that of a warrior , Mohamed (Pbuh) now declared it to be the will of God that the new faith should spread by the sword .
The Meccans were much outraged with the Medinites for sheltering Mohamed (Pbuh) and his disciples , whom they considered as revolutionaries . Conflicts between them and the people of Medina were unavoidable . The first conflict took place in the valley of Badr , a few miles from Medina , where the Meccans were defeated and lost a large number of prisoners . In the third year , Abu Sufian , son of Harb , son of Ommeya , with a large army of the Meccans and their allies , entered the Medinite territories . The Muslim force , which proceeded to repel the attack , was smaller in number . A battle took place at the foot of a hill called Ohod , which ended with the defeat of the Medinites . The Loss of the Meccans was too great to allow them to attack the city and they retreated to Mecca .
In the fifth year of the Hegira , the Meccans again tried to invade Medina with
a large army of 10 . 000 men . They sieged and held the city which was warded off by the vigilance of the Prophet (Pbuh) . At last , rain and storm killed their horses , and with their provisions becoming scanty , the Meccan army dissolved the way it had gathered . The Jews broke their promise to defend the city and joined the Meccans in their attack on Medina .
In the sixth year , the Prophet (Pbuh) granted a charter to all monks and Christians . In this charter , the Prophet (Pbuh) undertook to protect the Christians , to guard them from all injuries , to defend their churches and the residences of their priests .
In the eighth year of the Hegira , Mohamed (Pbuh) marched with ten thousand men against the idolaters in Mecca and entered it almost unopposed . With his followers , Mohamed (Pbuh) entered the Kabba and unrelentingly destroyed the idols saying:"Truth has come and falsehood vanisheth; verily falsehood is evanescent . " Later , the new creed (Islam) became firmly established among the independent tribes of Arabia .