After the departure of the Prophet for Madinah, Ali acted on behalf of the Prophet and returned to the Makkans the valuables that they had placed with the Prophet for safe keeping.
When the Prophet arrived in Madinah, he initiated the foundation of a cohesive society in the form of Brotherhood in Islam. He assigned one Muhajir (migrant) from Makkah as a brother unto one resident Ansar (helper) in Madinah. Since Ali was delayed in Makkah carrying out the duties entrusted to him by the Prophet, he was unable to participate in the newly formed brotherhood. On his arrival in Madinah, when Ali asked the Prophet who would be his 'brother' according to the new rule, the Prophet told him: "You and I are brothers in this world and the Hereafter. "
The idolaters of Makkah could not bear the escape of a handful of Muslims from under their noses. They wanted to kill the Prophet as well as his followers. In the second year of al-Hijra (the Islamic calendar year) they came out in Badr, in the outskirts of Madinaf4 well equipped with arms, eight hundred and fifty strong on foot, and one hundred on horseback. They were almost three times larger in number than the poorl3f equipped and hastily raised 'army' of just three hundred and fourteen. Muslims defenders (80 Muhajirs and 234 Ansars). Of these, only seventy were on camels and only two were on horseback! This was the first of the several confrontations the early Muslims had to face against the pagans in defense of their faith and property. The soldiery of Ali was unknown and untested until this first battle. With a resounding victory for Islam seventy of the bravest Quraish were slain and forty-five were taken prisoners of war. Ali emerged as the undisputed hero for the Muslims. He alone was responsible for almost one half of the carnage of the pagans in that battle. There was no family in Makkah that was not affected by Ali's sword in the Battle of Badr. Ali was to be looked upon as a deterrent and a formidable force in the future. He was not only the 'brother' of the new Prophet but also his fighting hand. The Prophet hardly ever used his sword himself Pleased with his unparalleled bravery as well as chivalry, the Prophet declared All openly as Asadullah (the Lion of Allah), and Yadullah (the Hands of Allah).
The Battle of Badr had far reaching consequences for Ali. Whereas this son of Abu Talib intimidated the pagans of Makkah, some among the believers carried grudges and jealousy, even animosity against him. The nascent faith had not yet cleansed their hearts of the old bias they had carried against the man who had, with his sword, cut down their kinsmen, even their closest relatives, their fathers, uncles, sons and husbands. This hostility, which they were unable to express during the life of the Prophet, for fear of annoying Allah's Messenger, showed up immediately after his death. The history, in the years to come, was to witness how the anti-Ali faction came out of the hole, succeeded in isolating the 'brother of the Prophet’ from the affairs of the Islamic State for 25 years. Even in his own Caliphate, the same group rose in rebellion with one pretext or another, and finally plotting to end his life with a sword. In the years that followed, the might and valor of Ali in the service of Islam was to be avenged by his adversaries in killing his sons, his grandsons and kinsmen in the battle of Karbala in an effort to get even with Ali, the Lion of Allah.
After the battle of Badr, the Prophet gave his only daughter Fatima in marriage to the virtuous Hashimite hero of Islam. Together they had two sons, Hasan and Husain, who succeeded as Imams after him, and they laid down their lives upholding and defending the values of Islam.
In later years, Ali continued to be the victorious champion of Islam while others had failed in some of the most threatening battles the Prophet had to undertake in defense. of Islam, the Muslims and the nascent Islamic State that was emerging in Yathrib. As a consequence, Ali received many valedictory titlcs from the Prophet, and wide acclaim among the believers. Only a few of these are briefly narrated below.
The enemies of lslam did not wait long to avenge their shameful defeat at Badr. The following year, they came back at Uhod under the command of Abu Sufyan, the chief of the Makkan infidels. They laid their siege right at the outskirts of Madinah with three times the force they had mustered previously at Badr. This time they were determined to exterminate Islam by killing the Prophet and his followers. Here again the Muslims were outnumbered three to one and poorly supplied. However, All and Hamza raged havoc in the ranks of the infidels, and Ali felled each of the seven standard bearers of the Makkan pagans successively. Together with the valiant believers, the enemy was routed and scattered in all directions. The battlefield resounded with the voice "There is none victorious other than Ali and there is no equal to the sword Zulfiqar."