First: The Muslims were permitted to fight without being dutybound to do it, as Allah (may He be Praised) says: Permission to fight (against disbelievers) is given to those (believers) who are fought against, because they have been wronged; and surely, Allâh is Able to give them (believers) victory
Second: The Muslims were ordered to fight those who fought them and refrain from those who refrained from fighting them. In this regard, Allah (Exalted be He) revealed the Ayah: There is no compulsion in religion. Verily, the Right Path has become distinct from the wrong path.
Third: Fighting against all the Mushriks and attacking them in their lands until there is no more Shirk (associating others with Allah in His Divinity or worship) and all worship is purely for Allah Alone, so that goodness embraces all inhabitants of earth, and to expand the realms of Islam, remove the propagators of Kufr and atheism from the path of Da'wah (Call to Islam), and let people receive the blessing of the just rule of Shari'ah (Islamic Law) and its lenient and merciful teachings.