Surah Al-An'am, ayah 119

6:119

وَمَا لَكُمۡ أَلَّا تَأۡكُلُواْ مِمَّا ذُكِرَ ٱسۡمُ ٱللَّهِ عَلَيۡهِ وَقَدۡ فَصَّلَ لَكُم مَّا حَرَّمَ عَلَيۡكُمۡ إِلَّا مَا ٱضۡطُرِرۡتُمۡ إِلَيۡهِۗ وَإِنَّ كَثِيرٗا لَّيُضِلُّونَ بِأَهۡوَآئِهِم بِغَيۡرِ عِلۡمٍۚ إِنَّ رَبَّكَ هُوَ أَعۡلَمُ بِٱلۡمُعۡتَدِينَ ١١٩

Wamā lakum allā ta'kulū mimmā dhukirasmullāhi 'alayhi waqad fassala lakum mā harrama 'alaykum illā madturirtum ilayhi wa inna kathīral layudillūna bi ahwā'ihim bighayri 'ilmin inna rabbaka huwa a'lamu bil-mu'tadīn

And why should you not eat of that upon which the name of Allāh has been mentioned while He has explained in detail to you what He has forbidden you, excepting that to which you are compelled.340 And indeed do many lead [others] astray through their [own] inclinations without knowledge. Indeed, your Lord - He is most knowing of the transgressors.

Footnotes

340 In cases of dire necessity, what is normally prohibited becomes permissible, but only to the extent of the need.