Short answer
Yes. An ectopic pregnancy cannot survive and can kill the mother, so treating it with medicine or surgery is allowed and is usually necessary to save her life. It is not the forbidden kind of abortion. The four schools agree in principle, since protecting the mother's life comes first. The loss is still real, and grieving it is natural.
When a pregnancy threatens the mother's life and the child has no chance of survival, removing it is permitted and can be obligatory, following the rules that harm is removed and the lesser of two harms is chosen. The mother bears no sin.
The four schools agree on this.
Explanation
In an ectopic pregnancy, the fertilised egg implants outside the womb, most often in a fallopian tube. It cannot grow into a baby, and if it ruptures it can cause dangerous internal bleeding. Doctors treat it with medicine (usually methotrexate), keyhole surgery, or in some cases careful monitoring.
Islam forbids ending a pregnancy without a valid reason. But it also forbids throwing yourself into destruction, and the Prophet ﷺ said there is to be no harm and no harming. The Hanafi scholars apply two rules here: harm must be removed, and when two harms cannot both be avoided, the lesser is chosen. Here the pregnancy has no chance of life, while the mother's life is at real risk. Treating it is therefore allowed, and when doctors say it is urgent, it is a duty. Contemporary scholars of all four schools agree.
Things families ask:
- Is there kaffarah or sin? No. This is treatment, not a forbidden abortion.
- Should we wait in case it moves? Follow the specialists. A qualified doctor's judgement decides the timing.
- Is the bleeding afterwards nifas? It depends on whether any features had formed, which in an early ectopic is usually not the case. See bleeding after a miscarriage and ask a mufti if unsure.
- Is it a punishment? No. See is a miscarriage a punishment.
Pregnancy loss of any kind is a real loss. The mother's pain, fear and grief are rewarded. For other situations involving the mother's life or a severe condition in the baby, see abortion for a fetal abnormality or to save the mother.
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah Al-Baqara 2:195
وَأَنفِقُوا۟ فِى سَبِيلِ ٱللَّهِ وَلَا تُلْقُوا۟ بِأَيْدِيكُمْ إِلَى ٱلتَّهْلُكَةِ ۛ وَأَحْسِنُوٓا۟ ۛ إِنَّ ٱللَّهَ يُحِبُّ ٱلْمُحْسِنِينَ ﴿١٩٥﴾
And spend in the way of Allah and do not throw [yourselves] with your [own] hands into destruction [by refraining]. And do good; indeed, Allah loves the doers of good.
Leaving a life-threatening condition untreated is not allowed.
Quran, Surah Al-Hajj 22:78
وَجَٰهِدُوا۟ فِى ٱللَّهِ حَقَّ جِهَادِهِۦ ۚ هُوَ ٱجْتَبَىٰكُمْ وَمَا جَعَلَ عَلَيْكُمْ فِى ٱلدِّينِ مِنْ حَرَجٍۢ ۚ مِّلَّةَ أَبِيكُمْ إِبْرَٰهِيمَ ۚ هُوَ سَمَّىٰكُمُ ٱلْمُسْلِمِينَ مِن قَبْلُ وَفِى هَٰذَا لِيَكُونَ ٱلرَّسُولُ شَهِيدًا عَلَيْكُمْ وَتَكُونُوا۟ شُهَدَآءَ عَلَى ٱلنَّاسِ ۚ فَأَقِيمُوا۟ ٱلصَّلَوٰةَ وَءَاتُوا۟ ٱلزَّكَوٰةَ وَٱعْتَصِمُوا۟ بِٱللَّهِ هُوَ مَوْلَىٰكُمْ ۖ فَنِعْمَ ٱلْمَوْلَىٰ وَنِعْمَ ٱلنَّصِيرُ ﴿٧٨﴾
And strive for Allah with the striving due to Him. He has chosen you and has not placed upon you in the religion any difficulty. [It is] the religion of your father, Abraham. Allah named you "Muslims" before [in former scriptures] and in this [revelation] that the Messenger may be a witness over you and you may be witnesses over the people. So establish prayer and give zakah and hold fast to Allah. He is your protector; and excellent is the protector, and excellent is the helper.
The Shariah removes hardship in cases of necessity.
Sunan Ibn Majah 2340
Graded sahih... لا ضرر ولا ضرار ...
"There is to be no harm and no harming."
The basis of the rule that harm is removed.
Sahih al-Bukhari 5641
Sahih... ما يصيب المسلم من نصب ولا وصب ولا هم ...
"No fatigue, illness, worry or grief befalls a Muslim except that Allah expiates some of his sins by it."
The mother's pain and grief are rewarded.
Where the ruling is recorded
- al-Ashbah wa al-Naza'ir (Ibn Nujaym), The rule that harm is removed, and choosing the lesser of two harms. When two harms conflict, the lesser is chosen to avoid the greater.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Nikah, chapter on the marriage of slaves, on ending a pregnancy. Ending a pregnancy before ensoulment is permitted for a valid excuse.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.