Though the Prophet (S.A.W) had left Mecca and settled in Madina yet the Meccan and specially the Quraish did not allow him to live in peace. They constantly raided the outskirts of Madina carrying away their cattles and destroying their fruit trees. Seeing that the Muslims are not retaliating to these hostilities and are suffering these losses with patience, Abu Jahal planned a bigger attack with one thousand men out of which seven hundred were on camels and three hundred on horseback, all fully armed. There was also a news that Abu Sufian too is coming with a big force from Syria to attack the Muslims. The Prophet (S.A.W) sent a scout party led by Ali (A.S.) to confirm the news and to know the exact strength of the enemies. When Ali (A.S.) confirmed the news, the Prophet (S.A.W) decided to stop them outside Madina and not to allow them to enter the city. But he could muster only 313 soldiers out of which seventy were on camels and two were on horseback. The Prophet (S.A.W) marched this small army of 313 towards Badr, a fertile valley, eight miles from Madina. The flag of this army was given to Ali (A.S.) who was only twenty one years old and with whom the Prophet (S.A.W) had married his own daughter just a few days ago.
The army of Abu Jahal blowing trumpets confronted the Muslims. Three famous soldiers of Quraish (Utba, father in law of Abu Sufian) Shaiba brother of Abu Sufian, and Al Waleed came out of their ranks and challenged the Prophet (S.A.W) and his men to have a duel with them. Three Ansars, Maaz, Mooz and Aof accepted their challenge and came out of their ranks to meet them. But the Quraish refused saying, "We have not come here to fight such ordinary men. We belong to the great tribe of Quraish and have come here to fight the people of our status. O Mohammad send some one from Quraish." The Prophet (S.A.W) ordered Ali (A.S.), Hamza (his uncle) and Obaida his cousin to fight with them. The three duels were quick and decisive. Ali (A.S.) killed Al Walid, Hamza killed Shaiba and as Obaida was wounded by Utba, Ali (A.S.) and Hamza pounced upon Utba and finished him. Three more soldiers of Abu Jahal came forward but they too were finished by these three soldiers of Islam. Another three ventured and they too went the same way. When the Prophet (S.A.W) saw that no one from the Quraish army is coming forward to have a duel he ordered his men to attack the entire army. The bravest and the noblest of Quraish fell. The clans of Bani Umayya, Bani Makhzoom and Bani Asad were the main losers. Out of seventy enemies killed in this war, Ali (A.S.) alone had killed thirty six. They were the very people who assembled to kill the Prophet (S.A.W) on the night of his immigration. Ali (A.S.)s sword had finished Abu Jahal, Walid bin Atba (maternal uncle of Moaviyah and brother of Hinda, Abu Sufians wife), Shaiba bin Rabia (Hindas uncle), Masood bin Mogheera (Khalid bin Waleeds uncle), Saeb bin Saeb, and Abu Umar bin Abu Sufian. Forty-five Meccans were taken prisoners. Among those injured was Amr ibne Abdawood the famous Arab soldier whom Ali (A.S.) killed in another war. This war was fought on 17th of Ramzan 2nd Hijri. In the following year, Ali (A.S.)s first son was born. The Prophet (S.A.W) named him Hasan and also called him Shabbar, the name of Prophet Haroons (A.S) first son. Shabbeer was the name of Prophet Haroons (A.S.) second son. It is interesting to note that the Prophet (S.A.W) always described his relation with Ali (A.S.) as that of Prophet Haroons (A.S.) relation to his brother Prophet Moses (A.S). The defeat at Badr had made the Meccans more angry, specially the Bani Ummayads, who had lost all their stalwarts. Preparation for another war to take the revenge of those killed had begun. Abu Sufian and his wife Hinda were now taking personal interest in organising the army. Her only wish was to see that the Prophet (S.A.W) his brother Ali (A.S.) and uncle Hamza were killed. Not finding her own people capable of killing these three men, she hired the services of Jabir Mutams negro slave who was considered as one of the best archers of Arabia. But he too confessed his inability to kill Mohammad (S.A.W) and Ali (A.S.). Mohammad (S.A.W) because he is always surrounded by his friends and admirers and therefore it is difficult to attack him in such a crowd and for Ali (A.S.) he said, Ali (A.S.) is more alert in the battlefield than any wolf, therefore attacking him is also not possible. Only an attempt can be made on Hamza who becomes blind in rage on entering the battlefield and keeps on attacking his enemies without even seeing. Though Hinda was not happy at his confession she however swore to suck the liver of Hamza if he was killed, and thus quench her thirst of revenge. She had also collected a band of women to entertain the soldiers. She wrote and recited revengeful poetries before the young soldiers of Quraish. Abu Sufian too had invited Kaab bin Ashraf and Omar bin Haas, Abu Aza, the three famous Jew poets of Madina and some forty more people to incite the Meccans to take revenge against Mohammad (S.A.W) and his men.
The Jews of Madina too did not like the victory of the Muslims at Badr. Before the arrival of the Prophet (S.A.W) in Madina the Jews were controlling the economy and were considered as the upper class because of their money lending and other businesses. As a matter of fact they had also welcomed the Prophet (S.A.W) to Madina considering his mission to be the same as their own. The Muslims then offered their Namaz facing Palestine, this encouraged them to believe that they can use the Prophet (S.A.W) for their own benefits. But when they saw that the Prophet (S.A.W) had changed the Qibla from Palestine to Kaaba in Mecca, and had also banned the taking and giving of interest which was their main source of income they became his enemies, they even did not like the creating of brotherhood among Muslims, which the Prophet (S.A.W) had done, and had started hating the Muslims. This hatred prompted these poets to go to Mecca and its surroundings and instigate the people to fight the Prophet (S.A.W) and his followers. They wrote and recited poetries on the slain heroes of Mecca. Kaab bin Ashraf had become so popular that he was invited in every house of Mecca. With the help of these three poets Abu Sufian collected a big force and brought them to Kaaba. Addressing them Abu Sufian said, "O Quraish, do not mourn or cry for your dear ones. For crying and mourning extinguishes the fire of hatred and revenge. I swear that I will not put oil in my hair nor sleep with my wife till I do not take revenge from Mohammad." Then he made the crowd hold the cover of Kaaba and swear to take the revenge of their dead and wipe out Mohammad (S.A.W) and his followers from the world.