What is the ruling of a Muslim working in the department of secret investigations for non-Muslims who track Muslims? Such a person claims to have the goal of helping Islam. I hope to provide him with the evidence for this ruling based on the opinions of the early and contemporary scholars. What should we do with this person to guide him to the straight path?
This job cannot be permitted. In fact, if a person works in these investigations, he will naturally cause harm to his brothers, because he works for a salary and thus he has to cause harm to his brothers or he will be considered as being disloyal by the others. In both cases he faces dangers, either in this world or in the Hereafter. Thus, we advice everybody not to take these types of jobs. We call upon every Muslim to be honest and never to be dishonest with those who trust him, be he a Muslim or a non-Muslim. Nevertheless, none should expose himself to such work that causes harm, either to himself or to others.
Therefore, he should keep himself away from such things, as one poet said:
To be safe from Salma and her neighbor, never pass by a valley that is next to her valley
Accordingly, to be safe and in order to have good relations with both Muslims and non-Muslims, one should keep himself away from such work, and he should not take a job that causes harm to people or to himself. This job involves great danger. We can never give a fatwa for the permissibility of this job as its prohibition is apparent. However, we will not deem him as a non-Muslim if he does this job. We rather say that he thus commits an enormous, evil misdeed.
Allah knows best