The short answer
Yes. The Quran repeatedly states that a person compelled by necessity, without desire for it and without going beyond the limit, commits no sin in eating what is otherwise forbidden. Scholars agree on this principle; they differ on how much may be eaten, and on related questions such as medicine.
The detail
Islamic law is built on mercy and on removing hardship. The Quran states that Allah wants ease for people, not hardship (2:185), and that He has not placed hardship on them in religion (22:78). Food is a clear example.
What the Quran says
After listing forbidden foods such as carrion, blood and pork, the Quran adds that whoever is driven by necessity, neither desiring it nor exceeding the limit, commits no sin, for Allah is Forgiving and Merciful (2:173). The same exception appears where it says Allah has explained what is forbidden except what you are compelled to (6:119), and in the list of forbidden meats where the one forced by hunger is excused (5:3).
What counts as necessity
Scholars define necessity as a real danger to life or of serious harm, such as starvation when no lawful food is available. It is not simply inconvenience, preference, or the difficulty of finding halal food in a new city. The conditions in the verse, not desiring it and not exceeding the limit, mean the person should not seek out the forbidden thing, and should take only what the need requires.
From this, a legal maxim
Jurists summarised the verses in well-known maxims: necessity makes forbidden things permissible, and necessity is measured by its extent. These maxims are applied far beyond food, but always with care.
Medicine
Whether medicines containing forbidden ingredients may be used, especially when alternatives exist, is a separate question on which scholars differ. Anyone facing it should ask a qualified scholar and their doctor.
Primary references
The Quran and hadith this answer rests on, quoted from the stored texts with their references.
From the Quran
Quoted from the stored Quran text with the translation named below each verse.
إِنَّمَا حَرَّمَ عَلَيْكُمُ ٱلْمَيْتَةَ وَٱلدَّمَ وَلَحْمَ ٱلْخِنزِيرِ وَمَآ أُهِلَّ بِهِۦ لِغَيْرِ ٱللَّهِ ۖ فَمَنِ ٱضْطُرَّ غَيْرَ بَاغٍۢ وَلَا عَادٍۢ فَلَآ إِثْمَ عَلَيْهِ ۚ إِنَّ ٱللَّهَ غَفُورٌۭ رَّحِيمٌ
He hath forbidden you only carrion, and blood, and swineflesh, and that which hath been immolated to (the name of) any other than Allah. But he who is driven by necessity, neither craving nor transgressing, it is no sin for him. Lo! Allah is Forgiving, Merciful.
وَمَا لَكُمْ أَلَّا تَأْكُلُوا۟ مِمَّا ذُكِرَ ٱسْمُ ٱللَّهِ عَلَيْهِ وَقَدْ فَصَّلَ لَكُم مَّا حَرَّمَ عَلَيْكُمْ إِلَّا مَا ٱضْطُرِرْتُمْ إِلَيْهِ ۗ وَإِنَّ كَثِيرًۭا لَّيُضِلُّونَ بِأَهْوَآئِهِم بِغَيْرِ عِلْمٍ ۗ إِنَّ رَبَّكَ هُوَ أَعْلَمُ بِٱلْمُعْتَدِينَ
How should ye not eat of that over which the name of Allah hath been mentioned, when He hath explained unto you that which is forbidden unto you unless ye are compelled thereto. But lo! many are led astray by their own lusts through ignorance. Lo! thy Lord, He is Best Aware of the transgressors.
حُرِّمَتْ عَلَيْكُمُ ٱلْمَيْتَةُ وَٱلدَّمُ وَلَحْمُ ٱلْخِنزِيرِ وَمَآ أُهِلَّ لِغَيْرِ ٱللَّهِ بِهِۦ وَٱلْمُنْخَنِقَةُ وَٱلْمَوْقُوذَةُ وَٱلْمُتَرَدِّيَةُ وَٱلنَّطِيحَةُ وَمَآ أَكَلَ ٱلسَّبُعُ إِلَّا مَا ذَكَّيْتُمْ وَمَا ذُبِحَ عَلَى ٱلنُّصُبِ وَأَن تَسْتَقْسِمُوا۟ بِٱلْأَزْلَٰمِ ۚ ذَٰلِكُمْ فِسْقٌ ۗ ٱلْيَوْمَ يَئِسَ ٱلَّذِينَ كَفَرُوا۟ مِن دِينِكُمْ فَلَا تَخْشَوْهُمْ وَٱخْشَوْنِ ۚ ٱلْيَوْمَ أَكْمَلْتُ لَكُمْ دِينَكُمْ وَأَتْمَمْتُ عَلَيْكُمْ نِعْمَتِى وَرَضِيتُ لَكُمُ ٱلْإِسْلَٰمَ دِينًۭا ۚ فَمَنِ ٱضْطُرَّ فِى مَخْمَصَةٍ غَيْرَ مُتَجَانِفٍۢ لِّإِثْمٍۢ ۙ فَإِنَّ ٱللَّهَ غَفُورٌۭ رَّحِيمٌۭ
Forbidden unto you (for food) are carrion and blood and swineflesh, and that which hath been dedicated unto any other than Allah, and the strangled, and the dead through beating, and the dead through falling from a height, and that which hath been killed by (the goring of) horns, and the devoured of wild beasts, saving that which ye make lawful (by the death-stroke), and that which hath been immolated unto idols. And (forbidden is it) that ye swear by the divining arrows. This is an abomination. This day are those who disbelieve in despair of (ever harming) your religion; so fear them not, fear Me! This day have I perfected your religion for you and completed My favour unto you, and have chosen for you as religion al-Islam. Whoso is forced by hunger, not by will, to sin: (for him) lo! Allah is Forgiving, Merciful.
شَهْرُ رَمَضَانَ ٱلَّذِىٓ أُنزِلَ فِيهِ ٱلْقُرْءَانُ هُدًۭى لِّلنَّاسِ وَبَيِّنَٰتٍۢ مِّنَ ٱلْهُدَىٰ وَٱلْفُرْقَانِ ۚ فَمَن شَهِدَ مِنكُمُ ٱلشَّهْرَ فَلْيَصُمْهُ ۖ وَمَن كَانَ مَرِيضًا أَوْ عَلَىٰ سَفَرٍۢ فَعِدَّةٌۭ مِّنْ أَيَّامٍ أُخَرَ ۗ يُرِيدُ ٱللَّهُ بِكُمُ ٱلْيُسْرَ وَلَا يُرِيدُ بِكُمُ ٱلْعُسْرَ وَلِتُكْمِلُوا۟ ٱلْعِدَّةَ وَلِتُكَبِّرُوا۟ ٱللَّهَ عَلَىٰ مَا هَدَىٰكُمْ وَلَعَلَّكُمْ تَشْكُرُونَ
The month of Ramadan in which was revealed the Qur'an, a guidance for mankind, and clear proofs of the guidance, and the Criterion (of right and wrong). And whosoever of you is present, let him fast the month, and whosoever of you is sick or on a journey, (let him fast the same) number of other days. Allah desireth for you ease; He desireth not hardship for you; and (He desireth) that ye should complete the period, and that ye should magnify Allah for having guided you, and that peradventure ye may be thankful.
Further sources
Written for Islamic Portal from the Quran cited above; school positions as commonly taught in the standard manuals of each school.
What scholars say
Commentators explained 'neither craving nor transgressing' in two main ways: not desiring the forbidden thing for its own sake, and not exceeding the amount needed. Some jurists added that a person whose journey is itself sinful does not benefit from travel concessions, though they discussed whether this applies to life-saving necessity. Contemporary scholars apply the principle of necessity carefully to issues such as medicine and medical treatment, and warn against stretching it to cover everyday convenience.
Where the schools differ
The four Sunni schools of law. Follow the school you were taught, or ask a scholar you trust.
All four schools agree that a person in genuine necessity may eat forbidden food to save their life, and that it may even be obligatory to do so rather than die. They differ on how much may be eaten.
- Hanafi
- Only as much as keeps the person alive and removes the danger may be eaten; eating to full satisfaction is not permitted.
- Shafi'i
- The relied-upon position is that the person eats only enough to remove the danger, unless stopping there would itself cause harm.
- Maliki
- The person may eat until satisfied and may take provisions of it if they expect the necessity to continue, since the Quran's permission is not limited to the smallest amount.
- Hanbali
- The well-known position is to eat only enough to remove the danger to life, with another reported view allowing satisfaction when the necessity is expected to continue.
In practice
- Hikers stranded for days without food, who find only non-halal tinned meat, may eat from it to survive.
- A traveller who simply cannot find a halal restaurant chooses vegetarian or fish options rather than claiming necessity.
- A patient asks their doctor about alternatives to a medicine containing pork-derived ingredients and consults a scholar if none exist.
Common misunderstandings
- It is better to die than eat pork. Scholars agree that in genuine life-threatening necessity, eating is allowed, and many say obligatory, because preserving life is a higher purpose.
- Necessity covers any difficulty. Inconvenience or preference is not necessity; the permission is for real danger.
- Once allowed, it is allowed freely. The verse limits it to what the need requires, without desire or excess.
Check your understanding
Try to explain the answer in two sentences, in your own words, as if to a friend. Then read the short answer again and compare.
Suggested lessons
Courses, lessons and guides that teach this topic step by step.
Review and provenance
- Written by
- Islamic Portal editorial team
- Added
- 10 November 2026
Corrections
No corrections have been needed.
