Praise be to Allah.
The scholars are unanimously agreed that for a man, i‘tikaaf is not valid unless it is done in the mosque, because Allah, may He be exalted, says (interpretation of the meaning): “And do not have sexual relations with them (your wives) while you are in I‘tikaf (i.e. confining oneself in a mosque for prayers and invocations leaving the worldly activities) in the mosques” [al-Baqarah 2:187]. So i‘tikaaf is to be done specifically in the mosques. See: al-Mughni by Ibn Qudaamah (3/189).
The majority of scholars are of the view that women are the same as men in this regard; so a woman’s i‘tikaaf is not valid unless it is done in the mosque, and it is not valid if done in the prayer-place of her house. For more information on this issue, please see fatwa no. 50025.
I‘tikaaf in the last ten days of Ramadan is Sunnah and mustahabb for men, and also for women if there is no danger of fitnah and there is a place that is only for women, and so long as it will not keep her away from her obligatory work, and it is done with the permission of her husband.
For more information on this issue, please see fatwa no. 37698.
The basic principle concerning i‘tikaaf is that it is Sunnah, not obligatory, and that it is not obligatory unless it is in fulfilment of a vow. If a person has made a vow to observe i‘tikaaf, then it is obligatory to fulfil it, because the Prophet (blessings and peace of Allah be upon him) said: “Whoever vows to do an act of obedience to Allah, let him obey Him, and whoever vows to do an act of disobedience to Allah, let him not disobey Him.” Narrated by al-Bukhaari (6696).
And ‘Umar (may Allah be pleased with him) said: O Messenger of Allaah, during the Jaahiliyyah I vowed that I would spend a night in i‘tikaaf in al-Masjid al-Haraam. He said: “Fulfil your vow.”Narrated by al-Bukhaari (6697) and Muslim (1656).
Ibn al-Mundhir said in his book al-Ijmaa‘ (p. 53): They are unanimously agreed that i‘tikaaf is Sunnah and is not obligatory upon people, unless a person has committed himself to it by way of a vow, in which case it is obligatory for him. End quote.
If a woman observes i‘tikaaf in the mosque, then gets her menses, she must leave the mosque – according to scholarly consensus – but what she has already done of i‘tikaaf is not rendered invalid by her menses, according to the majority of scholars.
Then she should go back home, and when she becomes pure, if her i‘tikaaf was obligatory, because of a vow, she must go back to the mosque and complete her i‘tikaaf, continuing from where she left off and making up what she missed; and she is not required to offer expiation.
But if it was a Sunnah i‘tikaaf, she does not have to go back to the mosque or make up this i‘tikaaf later on.
Imam Maalik said concerning women: If a woman does i‘tikaaf, then gets her menses whilst she is in i‘tikaaf, she should go back home, then when she becomes pure, she may go back to the mosque at whatever time she becomes pure, and continue her i‘tikaaf from where she left off. Al-Muwatta’ (1/316).
Shaykh Ibn Jibreen said: If she does i‘tikaaf, then gets her menses, she must leave the mosque until she becomes pure, then go back after she has purified herself.
If the time of i‘tikaaf ends before she has becomes pure from menses or nifaas (post-partum bleeding), she must make it up if her i‘tikaaf was obligatory in fulfilment of a vow, but it is waived if it was voluntary, because the time for it has now ended.
Hiwaar fi’l- i‘tikaaf, published on his website:
See also: al-Mughni (3/206); Sharh al-‘Umdah by Ibn Taymiyah (2/829 – as-Siyaam)