‘Aa’ishah narrated that the Messenger of Allah mentioned that he would observe I’tikaaf (seclusion in mosque for worship) in the last ten days of Ramadan. So, she sought his consent to perform it as well and he permitted her; then, Hafsah requested her to ask the Prophet for permission on her behalf, which she did. Then, when Zaynab bint Jahsh saw that, she ordered a tent be pitched for her and it was put up.
The Messenger of Allah used to proceed to his tent after the [morning] prayer; when he saw the erected tents, he inquired as to what they were for and was told that they belonged to ‘Aa’ishah, Hafsah and Zaynab . So, he remarked: “Is it righteousness which they intended by doing so? I am not going to perform I’tikaaf.” He then returned home and when the month of fasting was over, he performed I’tikaaf for ten days in the month of Shawwaal. [Al-Bukhari]
Another version, reported by Muslim, reads: “Whenever the Messenger of Allah intended to observe I’tikaaf, he would offer the dawn prayer and then enter his place of seclusion. Once, he planned to perform it in the last ten days of Ramadan, so, he ordered that his tent be pitched. Then, Zaynab instructed that a tent be erected for her, [too]. Thereafter, some of the wives of the Prophet also ordered that tents be set up for them. When the Messenger of Allah offered the dawn prayer, he looked and noticed the tents of his wives. Thereupon, he asked: ‘Do you intend to do righteousness?’ He directed that his tent be brought down and he did not observe I’tikaaf in Ramadan [that year], and instead did so in the first ten days of Shawwaal." [Muslim]
Benefits and rulings [derived from these Ahadeeth]
First: It is permissible for women to seclude themselves in the mosque for worship, if there are no chances of temptation.
Second: A woman should not do I’tikaaf without permission from her husband. There is a consensus [among scholars] on this point. If she does observe I’tikaaf without his consent, he has the right to take her out of the mosque. Furthermore, even if he has initially allowed his wife to do it, and then it occurs to him that he should prevent her due to a beneficial reason, he may do so.
Third: It is permissible to interrupt the I’tikaaf after starting it, if there is a need for it.
Fourth: I’tikaaf is not allowed except inside the mosque; were it to be valid anywhere else, it would have firstly been permitted for women to observe it in their prayer area at home.
Fifth: It is valid in the Sharee‘ah (Islamic jurisprudence) for a husband to discipline his wives and members of his household when he deems it necessary. The Prophet prevented his wives from doing I’tikaaf, even after he had permitted [some of] them to; his fear was that they might boast about it or compete with each other only out of jealousy.
Sixth: The Sharee‘ah has allowed making up for a missed supererogatory act of worship.
Seventh: Excessive jealousy is blameworthy and leads to bad consequences, because it stems from envy.
Eighth: It is permissible to quit a superior deed if that serves a benefit.
Ninth: An intention to observe I’tikaaf does not render it obligatory.
Tenth: One performing I’tikaaf may select a spot in the mosque for himself, so long as there is still sufficient room for others. He should choose a corner at the end of the mosque, in order to leave enough space and to be in proper seclusion.
Eleventh: The Prophet was good-mannered and kind to his wives; when he prevented them from I’tikaaf, for fear that they might fall into ostentation, he himself quit it, although he had the right to disallow them and proceed with his own I’tikaaf without them, if he so liked. However, the Prophet left it in order to console them and maintain good relations with them. This is how a Muslim should treat his family; even when he disciplines them, he should not exceed it to the level of retribution.
Twelfth: If the woman performing I’tikaaf menstruates, she should cease her seclusion; once her menses is over, she can resume it, based on what she previously completed.
Thirteenth: If one intends to do an act of worship but has not commenced it yet, he may decide against doing it or postpone it to a later time.
Fourteenth: If it is known that somebody is doing an act of worship to show off, he may be halted and hindered from doing it, as attested to by the statement of the Messenger of Allah : “Is it [truly] righteousness that you intend?” He meant that they had aimed only to impress him and endear themselves to him. For this reason, he interrupted what they intended and delayed the act of worship he had planned to do himself.
Fifteenth: It is favorable for one to withdraw from the people, family and anyone else during I’tikaaf, except when unavoidable, such as when gathering for prayer, a meal or any other necessity.
Sixteenth: The Sharee‘ah dictates that I’tikaaf may be performed in Ramadan – this is the guidance and Sunnah of the Prophet . However, it is permissible to do I’tikaaf at any other time, such as in Shawwaal, as the Prophet did, according to the aforementioned Hadeeth.
Seventeenth: I’tikaaf is to be done in rooms inside the mosque and whose gates open inward, since such halls are considered part of the mosque. It would be invalid, though, if done in rooms that are located outside the mosque, even if its doors open toward it, as they are not regarded as a part of the mosque.