Allah, the Blessed and Exalted, says: "While He has explained to you in detail what He has made unlawful for you, except what you are compelled to." [Surah al-An'am: 119]
And He said: "He has only forbidden you carrion, blood, the flesh of swine, and that over which a name other than Allah's has been invoked; but whoever is compelled, neither rebelling nor transgressing, there is no sin upon him." [Surah al-Baqarah: 173]
Mujahid (may Allah have mercy on him) said concerning "neither rebelling nor transgressing" [Surah al-Baqarah: 173]: "That is, he is not a highway robber, nor one who separates from (and rebels against) the rulers of the Muslims, nor one who sets out (on a journey) in disobedience to Allah, Majestic is His Majesty."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الضحايا / Q19634