Performing the worship of fasting in the month of Ramadan requires precise knowledge. It’s not simply about refraining from hunger and thirst from dawn to sunset, but also about protecting oneself from things that invalidate the fast (mufattirat). Doubts often arise among the public: “Does picking one’s nose invalidate the fast?”, “What is the ruling on brushing teeth and swallowing saliva?”, or “Is the fast valid if I receive an injection of medicine?”.
Mistakes in understanding these limitations can be fatal: worship can become invalid without us realizing it, or conversely, we burden ourselves with things that are actually permissible in Islamic law.
To address these doubts with a solid foundation, this article will dissect authoritative references within the Shafi’i school of thought, namely the book Asna al-Matalib Syarah Rawd at-Talib (Volume 1, pages 414-418) by Sheikh Zakariyya al-Anshari. The explanation below will detail things that invalidate the fast, ranging from sexual aspects, medical issues, to unintentional acts.
1. Basic Concept: What Invalidates a Fast?
Before delving into the details, we need to understand the basic principle. In the book Asna al-Matalib, the main principle held is the entry of a substance (‘ain) into the cavity of the body (jauf) through an opening (manfadh).
فصل: (ويفطر) الصائم بتعاطي المفطرات الآتي بيانها
“Article: And the fast is invalidated by doing things that invalidate it, which will be explained below…”
Things that invalidate a fast can be categorized into several main pillars:
- Entry of an object into a body cavity.
- Sexual activity (intercourse).
- Loss of reason or consciousness.
Let’s discuss them one by one in depth.
2. Sexual Activity and Desire

The first and most severely prohibited aspect in things that invalidate the fast relates to marital relations and the release of sexual desire.
Fasting has strict rules regarding sexual interaction. Not only intercourse, but things like kissing a spouse or masturbation also have their own legal details depending on whether or not there is arousal and the emission of semen.
a. The Law of Sexual Intercourse
Engaging in sexual intercourse (jimak) during the day in Ramadan is a grave violation. Scholars are in consensus (Ijmak) that this act invalidates the fast, whether or not ejaculation occurs.
فيفطر (بالجماع) ولو بغير إنزال (عمدا) بالإجماع
“Therefore, it is invalidated by sexual intercourse, even without the emission of semen intentionally, based on consensus (Ijma’).”
If someone is engaging in sexual intercourse and dawn breaks (Subuh prayer time enters), they are obligated to stop immediately. If they stop directly and withdraw, their fast remains valid even if semen is subsequently emitted (because the semen is a result of a previously permissible act). However, if they persist despite knowing that dawn has broken, their fast is invalidated and they incur a severe penalty (Kaffarah).
b. Masturbation and Physical Contact
Many ask, does masturbation invalidate the fast? The answer is: Yes, if done intentionally and semen is emitted. Sheikh Zakariyya defines istimna’ as the emission of semen without sexual intercourse, whether by a forbidden means (one’s own hand) or a permissible means (one’s wife’s hand).
قوله: (والاستمناء) وهو إخراج المني بغير جماع… (ولو بلمس وقبلة) بلا حائل
“And istimna’ is invalidated… even with touch and kissing without a barrier.”
It is important to note: If semen is emitted as a result of physical contact (such as kissing, hugging, or hand touching) accompanied by sexual arousal, then the fast is invalidated.
READ MORE: The Hukm of Sexual Intercourse, Kissing, and Masturbation While Fasting
c. Things That Do Not Invalidate (Thoughts & Gaze)
Not all seminal emission invalidates the fast. Here are the conditions that are excused according to Asna al-Matalib:
- Wet Dream (Ihtilam): It does not invalidate wudu because it occurs beyond conscious control.
- Only Thinking/Imagining: If someone fantasizes lewdly to the point of ejaculation without touching their genitals, their fast is NOT invalidated.
- Only Looking: Gazing at something that arouses sexual desire to the point of ejaculation (without touch) does not invalidate the fast.
قوله: (لا) بالاستمناء بنحو (فكر و) لا (نظر ولا ضم)… (بحائل)
“It is not invalidated by istimna’ merely due to thinking, nor is it invalidated by looking…”
d. The Ruling on Kissing One’s Spouse
Is it permissible to kiss one’s wife while fasting? The original ruling is Permissible (Allowed) on the condition that the person is able to control their desire. However, abstaining from it is more virtuous (Khilaful Aula). For young men whose desires are easily aroused, the ruling can become forbidden if there is fear of falling into sexual intercourse or masturbation.
3. Entry of Substances into Body Cavities (The Jauf & ‘Ain Principles)
This point is often a medical debate. The Shafi’i fiqh principle states: “What invalidates is what enters, not what exits.” But, enter where?
a. Definition of Openings (Manfadz)
Fasting is invalidated if any substance (‘ain)—however small, like a sesame seed or pebble—enters the body cavity (jauf) through a natural opening (manfadh). These openings are:
- Mouth.
- The nose (base limit).
- Ear.
- Acceptance and Rejection.
قوله: (فرع يفطر) الصائم أيضا (بوصول عين)… (من الظاهر في منفذ) مفتوح… (إلى ما يسمى جوفا)
“A fasting person’s fast is also invalidated by the entry of a substance (a material thing) from the outside through an open passage, into something referred to as a cavity (jauf).“
b. The Rulling of Injections, Infusions, and Drip Medications

Based on the principle above, we can map modern medical law:
- Ear & Nasal Drops:
If medicinal liquid is dripped into the ear until it reaches the inner part, or into the nose past the base of the nasal passage (khaisyum), then it Invalidates the Fast.
قوله: (فرع لو أدخل) الصائم (في أذنه… شيئا فوصل إلى الباطن أفطر)
- Injections and Infusions:
What is the ruling on injections while fasting? Sheikh Zakariyya explained about pores (masam). If something enters through the pores of the skin (not an open orifice), then it DOES NOT invalidate the fast, even if its effect reaches the inside of the body.
قوله: (وما) أي ولا بما (تشربته المسام)… (وإن وصل إلى الجوف)
Therefore, the majority of Shafi’i scholars rule that injections (intravenous/intramuscular) do not invalidate the fast because the needle does not enter through a natural opening such as the mouth or nose.
- Huqnah (Enema/Rectal Medicine):
Introducing medicine, whether liquid or solid (such as suppository hemorrhoid medication), through the anus Invalidates the Fast.
- Cupping and Blood Donation:
Performing cupping (hijamah) or blood donation (fashdu) DOES NOT invalidate the fast.
(ولا يفطر بالفصد والحجامة)
However, it is disliked (makruh) because it can weaken the physical condition of the person who is fasting.
For a specific discussion regarding the medical world, see our complete explanation about The Law of injections, infusions, and eye drops according to the book Asna al-Matalib at the following link “The Law of injections during fasting“.
4. Oral Fluids: Saliva, Phlegm, and Vomit

The oral area is a critical zone. Many people have doubts regarding the law of swallowing saliva and phlegm. Here is the explanation.
a. Swallowing Saliva
Swallowing one’s own saliva is Valid (Not Invalidating), provided three conditions are met:
- Pure: Saliva that is not mixed with other substances (such as food residue, gum blood, or dyes).
- Pure: The mouth is not in a state of impurity (for example, after vomiting, one must rinse their mouth first).
- Not Yet Exited: Saliva is still within the confines of the lips.
فرع: لو (ابتلع ريقه الصرف)… (لم يفطر) لعسر التحرز عنه
“If he swallows his pure saliva, it does not invalidate (the wudu/ablution) due to the difficulty of protecting oneself from it.”
If saliva has exited past the lips, or you wet a sewing thread and then swallow it again, then the fast is broken.
b. The Law of Swallowing Phlegm (Nukhama)
Phlegm is different from saliva. Phlegm is a thick substance originating from the chest cavity or head.
- If phlegm is still in the inner throat: It is permissible to swallow it.
- If the phlegm has reached the outer limit (makhraj of the letter Ha’ / ح) or the oral cavity: It is Obligatory to Discard it.
If phlegm is already in the mouth and you are able to expel it but intentionally swallow it instead, then your fast is invalidated.
قوله: (ولا قلع النخامة) من الباطن إلى الظاهر… (فإن جرت بنفسها)… (عاجزا عن المج) لها (فلا) يفطر
Unless the phlegm descends suddenly (swallowed unintentionally) and you did not have time to restrain it, then it is excusable.
c. Vomiting: Intentional vs. Unintentional
قوله: (و) يفطر (باستدعاء القيء)
- Intentionally Vomiting (Istiqa’a): Inserting a finger into the throat to induce vomiting is a fast-invalidating act.
- Involuntary Vomiting (Ghalabah): If nausea and vomiting occur suddenly, the fast is NOT invalidated, provided that none of the vomit is swallowed back and the mouth is immediately purified by rinsing.
So, although saliva does not invalidate the fast in principle, there are specific conditions where swallowing it can be problematic, especially if mixed with gum blood. Similarly, phlegm has a different throat limit. For complete details, read our dedicated article on The Law of Swallowing Saliva, Phlegm, and Vomit According to the Book Asna al-Matalib.
5. Factors of Ignorance, Forgetfulness, and Doubt
Islam is a religion that does not burden its followers. There are certain conditions where things that normally invalidate a fast are forgiven (ma’fu).
a. Eating and Drinking Due to Forgetfulness
A person who genuinely forgets that they are fasting, then eats a full plate of rice or drinks a glass of water, their fast is not invalidated. They do not need to make up (qadha) the fast.
قوله: (ولا يفطر الناسي) للصوم… (بالأكل ولو كثر)
“And the fast of someone who forgets [about their fast] is not invalidated… even if they eat a lot.”
This also applies to new converts to Islam (mualaf) or those who live far from scholars, who are unaware (ignorant) that a certain act invalidates the fast.
b. Road Dust and Food Remnants in Teeth
The entry of road dust (ghubar at-thariq) or flour sifting into the throat is excused because it is difficult to avoid. Similarly, food residue between the teeth carried by saliva unintentionally and difficult to separate, does not invalidate [the fast/prayer/wudu – depending on context, likely wudu].
c. Doubt Regarding Time (Syak): The Issue of Imsak & Maghrib
This is a crucial issue. What if we eat sahur while in doubt whether the dawn has broken?
ويحرم أكل الشاك هجوما آخر النهار لا آخر الليل
- Doubt at the End of the Afternoon (Maghrib): If you are in doubt “Has Maghrib prayer time arrived yet?”, then it is Haram to eat. You must first be certain that the sun has set. If you insist on eating and it turns out it is still daytime, you are obligated to make up (qadha) the fast.
- Doubt at the End of the Night (Before Dawn): If you are unsure “Has dawn broken yet?”, the original ruling is Permissible to Eat (because it is still considered night). However, if after eating suhoor it turns out to be proven that dawn had already broken while you were eating, then the fast for that day is Invalid and you are obligated to make up the fast (qadha). Therefore, it is highly recommended to be careful and pay attention to the imsakiyah schedule.
Make sure you have sahur before dawn. If you are unsure whether imsak has begun or not, read the ruling here so as not to fall into doubt that invalidates the fast.
Summary Table of Things That Invalidate a Fast
To facilitate your understanding, here is a quick summary of the legal status of various activities while fasting based on Asna al-Matalib:
| Activity / Matter | Fasting Status | Description / Condition |
| Sexual Intercourse (Intentional) | Invalidates | Obligatory Kaffarah (heavy penalty). |
| Masturbation (Intentional) | Invalidates | If semen is emitted. |
| Wet Dream | Valid | Because there is no element of intention. |
| Injection / Infusion | Valid | Enters through pores/vessels, not cavities. |
| Ear/Nose Drops | Invalidates | If it enters to the inner part. |
| Eye Drops (Kohl) | Valid | The eye is not a path to the stomach. |
| Swallowing Saliva | Valid | Condition: Pure & has not left the lips. |
| Swallowing Phlegm | Invalidates | If the phlegm is already in the mouth & can be expelled. |
| Unintentional Vomiting | Valid | Obligatory to rinse the mouth afterwards. |
| Eating Due to Forgetfulness | Valid | Considered a provision from Allah. |
FAQ: Frequently Asked Questions (Community Questions)
Here are the answers to popular questions regarding things that invalidate a fast:
Does swallowing the remaining water from gargling invalidate the fast?
No, as long as the water is merely an “athar” (residual wetness) that is difficult to avoid after the water is expelled. However, if you gargle excessively (mubalaghah) to the point that water enters the throat, then it invalidates [the ritual purity/ablution].
If you are eating suhoor and the Fajr adhan is heard, what should you do?
You are obligated to immediately discard or spit out any food in your mouth. If you discard it, your fast is valid. If you swallow it instead, your fast is broken.
Does fainting for a whole day invalidate the fast?
In a broader discussion of fiqh, if fainting occurs throughout the day (from Fajr to Maghrib) without any consciousness whatsoever, the fast is invalid. However, if there is even a brief moment of consciousness during the day, the fast is valid.
Does a swab test (nasal swab) invalidate the fast?
Based on the text of Asna al-Matalib which states that inserting an object into the nose past the nasopharynx (khaisyum) invalidates the fast, a deep swab test has the potential to invalidate it textually, so it is best to do it at night if possible.
Thus, a complete guide regarding things that invalidate the fast based on an analysis of the book Asna al-Matalib. Understanding the limits of jauf, ‘ain, and syahwat is very important to maintain the quality of our worship. Fasting is not only about abstaining from hunger, but also restraining oneself from all that invalidates it with correct knowledge.
May Allah accept our fasts and grant us correct understanding of the religion. And Allah knows best.
Reference
Zakariyā al-Anṣārī, Asnā al-Maṭālib fī Sharḥ Rawḍ al-Ṭālib, with a ḥāshiyah by Aḥmad al-Ramlī, edited by Muḥammad az-Zuhrī al-Ghamrāwī (Cairo: al-Maṭbaʿah al-Maymānīyah, 1313 H; repr. Dār al-Kitāb al-Islāmī), vol. 1, pp. 414-418.




