Answered by Shaykh Faraz Rabbani
Is it permissible for a Muslim to work in construction of a church and it’s the only job he could get?
Walaikum assalam wa rahmatullah,
There are two situations:
(a) as a contractor, it would be sinful and unlawful to build a church, because this is direct assistance in that which the Shariah has interdicted;
(b) as a worker, it would be permitted to work on a construction project to build a church or the like, though not in Muslim lands in Muslim areas. This is better to avoid when reasonably possible, but the employment itself is halal (because the work one is doing is itself permitted), and one’s earnings halal. At the same time, it would be one’s duty as a Muslim to dislike that which the church will be used for.
Allah Most High commanded us not to assist others in sin and vice. In the Hanafi school, this has levels:
1. It is haram to do that which is a direct cause for sin;
2. It is disliked to do that which is an indirect cause for sin;
3. It is better to avoid that which could be a cause for sin.
The distinctions are subtle, however, and one should consult with scholars regarding particular cases. The Messenger of Allah (Allah bless him and give him peace) said,
“The lawful is clear, and the unlawful is clear. Between them are unclear matters that most do not know about.” [Bukhari and Muslim]
It is deduced from this that there are some whodo know about such unclear matters. It is the scholars. Our duty in such matters is simple: it is to fulfill the command of our Beloved:
“Ask the people of understanding if you know not.” [Qur’an, 16.43]
The fiqh behind this issue
`Ala’ al-Din al-Haskafi (Allah have mercy on him) said in hisDurr al-Mukhtar, considered the most definitive commentary in Hanafi fiqh for legal details,
“(And) it is permitted to repair a church or (to transport wine for a non-Muslim) by oneself or one’s vehicle (for money).”
Ibn Abidin commented in his Radd al-Muhtar, which is the primary reference for the relied upon positions of the school,
“(His saying, ‘It is permitted to repair a church.’)
It is stated in al-Khaniyya that if one got hired to work in repairing a church, there is nothing wrong with it [f: though it is better not to, as the expression la ba’sindicates], because the sin is not in the action itself.
(His saying, ‘and to transport wine for a non-Muslim’)
Zayla`i said,  ‘This is Abu Hanifa’s position. His two companions [f: Abu Yusuf and Muhammad ibn al-Hasan] said that it is [prohibitively] disliked, because the Prophet (Allah bless him & give him peace) cursed ten with regards to wine, and he included the one who transports it. Abu Hanifa’s reasoning is that the hiring is for transporting itself is neither a sin nor a reason for it. Rather, the sin only occurs through the action of a willing actor, and drinking [f: which is the sin, for example] is not necessarily entailed by the transportation, because it could be [f: for a permitted reason such as] to throw away or to transform into vinegar. Thus it is akin to being hired to press or cut grapes. As for the hadith, it is interpreted to mean transporting with the intention of sin…’
Then, Zayla`i said, ‘The same difference exists [f: between Abu Hanifa and his two companions] if he is hired with a vehicle to transport wine, or if hired to herd pigs. In such cases, the wages are permissible according to Abu Hanifa, and [prohibitively] disliked according to Abu Yusuf and Muhammad ibn al-Hasan. [f: The relied upon position in these issues is that of Abu Hanifa.]” [Radd al-Muhtar `ala al-Durr al-Mukhtar, ‘Bab al-Bay`’]
And Allah alone gives success.
 In his Tabyin al-Haqa’iq Sharh Kanz al-Daqa’iq in 6 volumes. It is one of the best books in the Hanafi school for legal reasoning.