Q. Is it true to say that Islam was spread by the sword? What was the purpose of fighting so many battles especially during the caliphate of Umar (radiallahu anhu)?
A. No, it is not true to say that Islam was spread by the sword. A look into the history of Islam reveals that shirk/kufr were being forced upon the people who had accepted Islam, and it is on account of defending their religion, the Muslims had to fight. Their fighting was basically to defend themselves from their enemies.
During the time of the Prophet (SAS), the non-Muslims of Makka and Madina and the surrounding territories disliked the religion which the Prophet (SAS) was preaching. They saw it as a threat to their rule and power, and they feared that with this new religion, the ancestral practices of shirk and wrongdoings will be removed. In order to stop the movement of Islam, they thought that the only way was to kill the Prophet (SAS) and the Muslims, and in this way Islam will die forever. During the Makkan life, the Prophet Muhammad (SAS) was not permitted to fight, retaliate or even defend himself. As such, he and the Muslims continued to be persecuted in the most cruel and inhumane ways. The first 13 years in Makka was the worst time for the Prophet (SAS) and the Muslims. It was a time when they had to go through the worst trials, suffering and persecution. Eventually, the Prophet (SAS) along with the few Muslims migrated to Madina and settled in an environment where they looked forward for a peaceful living. The wicked unbelievers of Makka did not spare them at Madina. Instead, they came after them and vowed to end their lives. It was in this state, after having spent 13 years under the worst sufferings, the Prophet (SAS) was allowed by Allah to defend himself and the religion which Allah Has sent with him. From this moment onwards, the unbelievers never stopped attacking the Muslims, and the Muslims had no choice except to fight in order to protect their lives, their properties and the religion which they had accepted.
History makes it very clear that Bilal (RA), Khabab, Khubaib, Ammaar bin Yasir (RA) and the likes, were flogged and persecuted, to reject Islam and accept shirk (polytheism). People were therefore beaten to give up Islam, not to accept it.
In their fight against Islam, the unbelievers of Makka solicited support from all the surrounding tribes, even the Roman Emperor sent troops to help them. In all these situations, the Muslims had no choice except to fight and defend themselves. If this was not done, then they would have all been killed and wiped out from the face of the earth.
Eventually, Allah gave victory to Islam, and the religion of truth was established in Makka and Madina, and in surrounding territories. The Prophet (SAS) then passed away and Abu Bakr (RA) became the khalifa. After the demise of the Prophet (SAS), apostasy started to spread to different tribes in Arabia. It was a great challenge for the 1st khalifa, however, within a year Abu Bakr (RA) was able to put down these uprisings. These could not be stopped without a fight, and Abu Bakr had to defend Islam from the treacherous acts of the apostates. This brought about a few battles.
When the issue of apostasy was brought under control, another problem erupted where those outside of the land of Arabia started to plot in attacking the Muslims. This came about when the Jews and the Hypocrites who were turned out of Madina, constantly sent messages to the Persians and the Romans to attack the Muslims at Madina. These enemies of Islam then turned their attention to Islam and a number of battles ensued. From before, both these empires were totally set against Islam, and although they tried their best to attack the Muslims while the Prophet (SAS) was alive, they never succeeded. Now that he has passed away, they saw it as an advantage to go fierce into the attack of the Muslims. However, the faith, strength and courage of the Muslims proved too good for them and they were not able to get an upper hand upon the Muslims during the time of Abu Bakr (RA). However, upon the death of Abu Bakr, the Romans on one hand, and the Persians on the other, gathered great support to begin their attacks on the Muslims. Thy suffered losses in the past which they vowed to avenge, and thus mustered great armies to wipe out the Muslims. Umar (RA), having newly assumed the role of Khalifa had no choice except to defend the Muslims and lands of Islam from the evils of the enemies of Islam. Umar (RA) therefore continued from Abu Bakr (RA) in this regard, and thus dispatched armies to different fronts in order to protect the Muslims. The victories which came to the Muslims, incited the Romans and Persians to always return to battles at different places, and so Umar (RA) had no choice except to accept the challenges.
Heraclius had his Roman soldiers around Hims, Damascus, Fihl, Baisan, Irqah, and Beirut. Umar (RA) sent his armies to meet these Roman soldiers at these places to protect the Muslims. Alhamdulillah, all these territories were won by the Muslims.
On the other hand, Rustom, the Persian ruler mustered soldiers at different places like Kaskar, Namariq, Khaffan, Baqshia and others. Their plan was to attack the Muslims. Umar (RA) had to send troops who took care of this opposition. In this way, the Persians as well as others sent armies to different places with the prime objective of attacking the Muslims. As the khalifa and leader of the Muslims, Umar (RA) had to take care of all these matters. It is for this reason, many battles took place during the caliphate of Umar(RA).
And Allah knows best.
Mufti Waseem Khan
This answer was collected from DarulUloomTT.net, which is operated under the supervision of Mufti Waseem Khan from Darul Uloom Trinidad and Tobago.