The ruling on working as an engineer varies according to the nature of the building of which he will be in charge of the design and construction
Praise be to Allah
In the case of one who is working in the field of engineering, whether in planning, supervision or maintenance, his work must match one of the following three scenarios:
Where he is involved in the construction of haraam buildings, such as banks, breweries, tourist resorts, churches, and similar places of sin and disbelief (kufr). The ruling on such actions is very clear, which is that it is prohibited, by which we mean that the prohibition applies to all types of participation in building them. That comes under the heading of cooperating in sin and transgression, which Allah, may He be exalted, has forbidden in the verse in which He says (interpretation of the meaning): “but do not help one another in sin and transgression. And fear Allah. Verily, Allah is Severe in punishment” [al-Maa’idah 5:2].
For more details on that, please see the answer to question no. 47513.
Where he is involved in the construction of Islamically prescribed or permissible buildings, such as mosques, homes and hotels that will not be used for sinful purposes. The ruling on that is that it is permissible, and there is no difference of opinion concerning that among the scholars.
Where he is involved in the construction of buildings or places where halaal and haraam are mixed, such as building integrated cities or subdivisions, in which there are mosques and homes, but there are also churches, banks and tourist facilities. The ruling in this case is that it is not permissible for him to be involved in the planning of the haraam places, or to supervise their construction or maintenance, but it is permissible for him to work on the construction of permissible places and buildings.
See the answer to question no. 82292
What we have said about the work of an engineer is also applicable to the work of accountants, labourers and others who work in the public or private sector, who may be faced in the course of their work with tasks that involve haraam elements, even though their work is permissible in principle. There is nothing wrong with a person being involved in the permissible work that does not involve anything haraam, but he has to avoid the haraam work and not participate in it in any way. If he fears that he will not be able to avoid the haraam elements, then what he must do is leave this job and look for permissible work that does not involve anything haraam.
The scholars of the Standing Committee for Issuing Fatwas were asked:
I have an opportunity to work in an accounting and financial auditing office, which – among its ordinary work – reviews and audits the accounts of insurance companies and banks, both those that deal with riba and those that do not. They also supervise the accounts of nightclubs and tourist hotel companies. Is it Islamically permissible for me to apply for a job there, which will give me a monthly salary? Please note that my qualifications are appropriate for this job.
Please note: I know that the work of these offices is not limited to insurance companies, riba-based banks, tourism companies and nightclubs; rather they also supervise the accounts of commercial investment companies and of dignified professions such as doctors, engineers, teachers and artisans. Therefore I hope that you can answer my questions so as to put my mind at rest.
If the situation of the office in which you want to work is as you describe, that it reviews and audits the accounts of insurance companies and riba-based banks, and supervises the accounts of nightclubs, then it is not permissible for you to work for them on these matters, because working on these things comes under the heading of cooperating with their owners in sin and transgression. Allah, may He be exalted, says (interpretation of the meaning): “but do not help one another in sin and transgression” [al-Maa’idah 5:2].
But if your work will be in areas other than those mentioned, namely permissible things such as the accounts of those who practice dignified professions and doctors, then there is nothing wrong with that. However it is better to keep away from that, for fear of participating in the haraam activities mentioned above. End quote.
Shaykh ‘Abd al-‘Azeez ibn Baaz, Shaykh ‘Abd ar-Razaaq ‘Afeefi, Shaykh ‘Abdullah ibn Ghadyaan, Shaykh ‘Abdullah ibn Qa‘ood
Fataawa al-Lajnah ad-Daa’imah (15/6, 7)
And Allah knows best.