Yahya related to me from Malik that he had asked Ibn Shihab whether someone doing itikaf could go into a house to relieve himself, and he said, "Yes, there is no harm in that." Malik said, "The situation that we are all agreed upon here is that there is no disapproval of anyone doing itikaf in a mosque where jumua is held. The only reason I see for disapproving of doing itikaf in a mosque where jumua is not held is that the man doing itikaf would have to leave the mosque where he was doing itikaf in order to go to jumua, or else not go there at all. If, however, he is doing itikaf in a mosque where jumua is not held, and he does not have to go to jumua in any other mosque, then I see no harm in him doing itikaf there, because Allah, the Blessed and Exalted, says, 'While you are doing itikaf in mosques,' and refers to all mosques in general, without specifying any particular kind." Malik continued, "Accordingly, it is permissiblefor a man to do itikaf in a mosque where jumua is not held if he does not have to leave it to go to a mosque where jumua is held." Malik said, "A person doing itikaf should spend the night only in the mosque where he is doing itikaf, except if his tent is in one of the courtyards of the mosque. I have never heard that someone doing itikaf can put up a shelter anywhere except in the mosque itself or in one of the courtyards of the mosque. Part of what shows that he must spend the night in the mosque is the saying of A'isha, 'When the Messenger of Allah ﷺ was doing itikaf, he would only go into the house to relieve himself.' Nor should he do itikaf on the roof of the mosque or in the minaret." Malik said, "The person who is going to do itikaf should enter the place where he wishes to do itikaf before the sun sets on the night when he wishes to begin his itikaf, so that he is ready to begin the itikaf at the beginning of the night when he is going to start his itikaf. A person doing itikaf should be occupied with his itikaf, and not turn his attention to other things which might occupy him, such as trading or whatever. There is no harm, however, if some one doing itikaf tells some one to do something for him regarding his estate, or the affairs of his family, or tells someone to sell some property of his, or something else that does not occupy him directly. There is no harm in him arranging for someone else to do that for him if it is a simple matter." Malik said, "I have never heard any of the people of knowledge mentioning any modification as far as how to do itikaf is concerned. Itikaf is an act of ibada like the prayer, fasting, the hajj, and such like acts, whether they are obligatory or voluntary. Anyone who begins doing any of these acts should do them according to what has come down in the sunna. He should not start doing anything in them that the muslims have not done, whether it is a modification that he imposes on others, or one that he begins doing himself. The Messenger of Allah ﷺ practised itikaf, and the muslims know what the sunna of itikaf is." Malik said, "Itikaf and jiwar are the same, and Itikaf is the same for a village-dweller as it is for a nomad."
عَنِ الرَّجُلِ يَعْتَكِفُ هَلْ يَدْخُلُ لِحَاجَتِهِ تَحْتَ سَقْفٍ فَقَالَ نَعَمْ لاَ بَأْسَ بِذَلِكَ قَالَ مَالِكٌ الأَمْرُ عِنْدَنَا الَّذِي لاَ اخْتِلاَفَ فِيهِ أَنَّهُ لاَ يُكْرَهُ الاِعْتِكَافُ فِي كُلِّ مَسْجِدٍ يُجَمَّعُ فِيهِ وَلاَ أُرَاهُ كُرِهَ الاِعْتِكَافُ فِي الْمَسَاجِدِ الَّتِي لاَ يُجَمَّعُ فِيهَا إِلاَّ كَرَاهِيَةَ أَنْ يَخْرُجَ الْمُعْتَكِفُ مِنْ مَسْجِدِهِ الَّذِي اعْتَكَفَ فِيهِ إِلَى الْجُمُعَةِ أَوْ يَدَعَهَا فَإِنْ كَانَ مَسْجِدًا لاَ يُجَمَّعُ فِيهِ الْجُمُعَةُ وَلاَ يَجِبُ عَلَى صَاحِبِهِ إِتْيَانُ الْجُمُعَةِ فِي مَسْجِدٍ سِوَاهُ فَإِنِّي لاَ أَرَى بَأْسًا بِالاِعْتِكَافِ فِيهِ لأَنَّ اللَّهَ تَبَارَكَ وَتَعَالَى قَالَ وَأَنْتُمْ عَاكِفُونَ فِي الْمَسَاجِدِ فَعَمَّ اللَّهُ الْمَسَاجِدَ كُلَّهَا وَلَمْ يَخُصَّ شَيْئًا مِنْهَا قَالَ مَالِكٌ فَمِنْ هُنَالِكَ جَازَ لَهُ أَنْ يَعْتَكِفَ فِي الْمَسَاجِدِ الَّتِي لاَ يُجَمَّعُ فِيهَا الْجُمُعَةُ إِذَا كَانَ لاَ يَجِبُ عَلَيْهِ أَنْ يَخْرُجَ مِنْهُ إِلَى الْمَسْجِدِ الَّذِي تُجَمَّعُ فِيهِ الْجُمُعَةُ قَالَ مَالِكٌ وَلاَ يَبِيتُ الْمُعْتَكِفُ إِلاَّ فِي الْمَسْجِدِ الَّذِي اعْتَكَفَ فِيهِ إِلاَّ أَنْ يَكُونَ خِبَاؤُهُ فِي رَحَبَةٍ مِنْ رِحَابِ الْمَسْجِدِ وَلَمْ أَسْمَعْ أَنَّ الْمُعْتَكِفَ يَضْرِبُ بِنَاءً يَبِيتُ فِيهِ إِلاَّ فِي الْمَسْجِدِ أَوْ فِي رَحَبَةٍ مِنْ رِحَابِ الْمَسْجِدِ وَمِمَّا يَدُلُّ عَلَى أَنَّهُ لاَ يَبِيتُ إِلاَّ فِي الْمَسْجِدِ قَوْلُ عَائِشَةَ كَانَ رَسُولُ اللَّهِ ﷺ إِذَا اعْتَكَفَ لاَ يَدْخُلُ الْبَيْتَ إِلاَّ لِحَاجَةِ الإِنْسَانِ وَلاَ يَعْتَكِفُ فَوْقَ ظَهْرِ الْمَسْجِدِ وَلاَ فِي الْمَنَارِ يَعْنِي الصَّوْمَعَةَ وَقَالَ مَالِكٌ يَدْخُلُ الْمُعْتَكِفُ الْمَكَانَ الَّذِي يُرِيدُ أَنْ يَعْتَكِفَ فِيهِ قَبْلَ غُرُوبِ الشَّمْسِ مِنَ اللَّيْلَةِ الَّتِي يُرِيدُ أَنْ يَعْتَكِفَ فِيهَا حَتَّى يَسْتَقْبِلَ بِاعْتِكَافِهِ أَوَّلَ اللَّيْلَةِ الَّتِي يُرِيدُ أَنْ يَعْتَكِفَ فِيهَا وَالْمُعْتَكِفُ مُشْتَغِلٌ بِاعْتِكَافِهِ لاَ يَعْرِضُ لِغَيْرِهِ مِمَّا يَشْتَغِلُ بِهِ مِنَ التِّجَارَاتِ أَوْ غَيْرِهَا وَلاَ بَأْسَ بِأَنْ يَأْمُرَ الْمُعْتَكِفُ بِبَعْضِ حَاجَتِهِ بِضَيْعَتِهِ وَمَصْلَحَةِ أَهْلِهِ وَأَنْ يَأْمُرَ بِبَيْعِ مَالِهِ أَوْ بِشَىْءٍ لاَ يَشْغَلُهُ فِي نَفْسِهِ فَلاَ بَأْسَ بِذَلِكَ إِذَا كَانَ خَفِيفًا أَنْ يَأْمُرَ بِذَلِكَ مَنْ يَكْفِيهِ إِيَّاهُ قَالَ مَالِكٌ لَمْ أَسْمَعْ أَحَدًا مِنْ أَهْلِ الْعِلْمِ يَذْكُرُ فِي الاِعْتِكَافِ شَرْطًا وَإِنَّمَا الاِعْتِكَافُ عَمَلٌ مِنَ الأَعْمَالِ مِثْلُ الصَّلاَةِ وَالصِّيَامِ وَالْحَجِّ وَمَا أَشْبَهَ ذَلِكَ مِنَ الأَعْمَالِ مَا كَانَ مِنْ ذَلِكَ فَرِيضَةً أَوْ نَافِلَةً فَمَنْ دَخَلَ فِي شَىْءٍ مِنْ ذَلِكَ فَإِنَّمَا يَعْمَلُ بِمَا مَضَى مِنَ السُّنَّةِ وَلَيْسَ لَهُ أَنْ يُحْدِثَ فِي ذَلِكَ غَيْرَ مَا مَضَى عَلَيْهِ الْمُسْلِمُونَ لاَ مِنْ شَرْطٍ يَشْتَرِطُهُ وَلاَ يَبْتَدِعُهُ وَقَدِ اعْتَكَفَ رَسُولُ اللَّهِ ﷺ وَعَرَفَ الْمُسْلِمُونَ سُنَّةَ الاِعْتِكَافِ قَالَ مَالِكٌ وَالاِعْتِكَافَ وَالْجِوَارُ سَوَاءٌ وَالاِعْتِكَافُ لِلْقَرَوِيِّ وَالْبَدَوِيِّ سَوَاءٌ