I am serving in the British Armed Forces. Recently, I have become a practicing Muslim. My concern is about the legality of my job from the Islamic point of view. Also, as a worst case scenario, I would like to know the duties Islam imposes on me in case Britain some day decides to attack a Muslim country. Would I be required to resign at that time? Conversely, if a Muslim country attacks Britain, what should I do?
In principle, you can serve in the army of any country whether Muslim or non-Muslim if you are freely able to practice your religion. Such a job is perfectly legal from the Islamic point of view.
In the extreme situation you have mentioned, the following points should help you in taking a decision:
1. If you are bound in a contract with your employer to perform certain duties in case of war, you must honour it to the best of your ability.
2. According to the Qur'an, there is only one valid reason for a Muslim to wage Jihad today under the command of some state: The objective of the whole campaign should be to curb oppression and injustice perpetrated by the enemy country. Injustice and oppression deserve to be uprooted whether they are perpetrated by Muslims or by non-Muslims. So if this is the case, you can participate in the war in whatever capacity you have been appointed.
3. If you think that Britain has some other objective in mind while attacking a country, then of course you are required by your religion not to take part in such a war – even if this implies that you have to suffer losses like penalties or even being dismissed from your job.
4. If a Muslim country attacks Britain, the parameter you have to analyze is identical. If it is undertaking this exercise because Britain is guilty of oppression and injustice, then you should not fight for Britain. If this is not the case and the warring Muslim country has some other objective to fulfil you can participate fully in defending the frontiers of Britain.