Neither of which is mandatory, so neither is absolutely binding. However, remaining in his I'tikaf is more excellent, because the Prophet (peace and blessings be upon him) would not stop for the sick and it was not obligatory upon him. As for if he goes out for something that is unavoidable, and then asks about the sick person while on his way without stopping, it is permitted, because the Prophet (peace and blessings be upon him) did that.
Second Section: If he stipulates performing that in his I'tikaf, then he may perform it, whether the I'tikaf is obligatory or non-obligatory. Likewise, what constitutes an act of drawing near to Allah, such as visiting his family, a righteous person, a scholar, or attending a funeral; and likewise, what is permissible and needed, such as eating at his home and spending the night there, he may do so. Al-Athram said: I heard Abu 'Abd Allah being asked about a person in I'tikaf who stipulates eating with his family? He said: If he stipulates it, then yes. He was asked: Do you permit a condition in I'tikaf? He said: Yes. I said to him: And does he spend the night with his family? He replied: If it is voluntary, it is permitted. Among those who permitted stipulating dinner with one's family are al-Hasan, al-'Ala' ibn Ziyad, al-Nakha'i, and Qatadah. Abu Mijlaz, Malik, and al-Awza'i forbade it. Malik said: There is no condition in I'tikaf. Our view is that it becomes binding through his contract, so the condition regarding it is up to him, just like the stationing (at 'Arafat). Moreover, I'tikaf is not restricted to a specific amount; so when he stipulates going out, it is as if he vowed the amount of time he spent. If he says: 'Whenever I fall ill or some emergency arises, I shall leave,' his condition is permitted.
Section: If he stipulates intercourse during his I'tikaf, or leisure, or outings, or selling for trade, or earning a living through a craft in the mosque, it is not permitted; because Allah the Almighty said: {And do not have relations with them while you are staying for worship in the mosques} [Qur'an 2:187]. [If he stipulates that, then his stipulation is a condition] for the disobedience of Allah the Almighty. Craftsmanship in the mosque is forbidden even outside of I'tikaf, so it is all the more so during I'tikaf. All other matters we mentioned are similar to this and there is no need for them. If he is in need of them, he should not observe I'tikaf, because abandoning I'tikaf is better than performing what is forbidden. Abu Talib said: I asked Ahmad about the person in I'tikaf who performs his work as a tailor or other? He said: It does not please me that he should work. I said: Even if he is in need? He said: If he is in need, he should not observe I'tikaf.
(4) Surah al-Baqarah 187. (5) In [A], [B], and [M]: "if he stipulates that, then his stipulation is a condition".
واحِدٍ منهما تَطَوُّعٌ، فلا يَتَحَتَّمُ واحِدٌ منهما، لكنَّ الأفْضَلَ المُقَامُ على اعْتِكَافِه؛ لأنَّ النَّبِىَّ -صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ- لم يَكُنْ يُعَرِّجُ على المَرِيضِ ولم يَكُنْ وَاجِبًا عليه. فأمَّا إن خَرَجَ لمَا لا بُدَّ منه، فسَألَ عن المَرِيضِ فى طَرِيقِه، ولم يُعَرِّجْ، جازَ؛ لأنَّ النَّبِىَّ -صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ- فَعَلَ ذلك. الفصل الثانى، إذا اشْتَرَطَ فِعْلَ ذلك فى اعْتِكافِه، فله فِعْلُه، وَاجِبًا كان الاعْتِكافُ أو غيرَ واجِبٍ. وكذلك ما كان قُرْبَةً، كزِيَارَةِ أهْلِه، أو رَجُلٍ صَالِحٍ أو عَالِمٍ، أو شُهُودِ جِنازَةٍ، وكذلك ما كان مُبَاحًا ممَّا يَحْتَاجُ إليه، كالعَشَاءِ فى مَنْزِلِه، والمَبِيتِ فيه، فله فِعْلُه. قال الأَثْرَمُ: سمعتُ أبا عبدِ اللهِ يُسْأَلُ عن المُعْتَكِفِ يَشْتَرِطُ أن يَأَكُلَ فى أهْلِه؟ قال: إذا اشْتَرَطَ فنعم. قِيلَ له: وتُجِيزُ الشَّرْطَ فى الاعْتِكافِ؟ قال: نعم. قلتُ له: فيَبِيتُ فى أهْلِه؟ فقال: إذا كان تَطَوُّعًا، جازَ. وممَّن أجازَ أن يَشْتَرِطَ العَشاءَ فى أَهْلِه الحسنُ، والعلاءُ بن زِيادٍ، والنَّخَعِىُّ، وقَتادَةُ. ومنع منه أبو مِجْلَزٍ، ومالِكٌ، والأوْزَاعِىُّ. قال مالِكٌ: لا يكونُ فى الاعْتِكافِ شَرْطٌ. ولَنا، أنَّه يَجِبُ بِعَقْدِه، فكان الشَّرْطُ إليه فيه كالوُقُوفِ، ولأنَّ الاعْتِكافَ لا يَخْتَصُّ بِقَدْرٍ، فإذا شَرَطَ الخُرُوجَ فكأنَّه نَذَرَ القَدْرَ الذى أقامَه. وإن قال: متى مَرِضْتُ أو عَرَضَ لى عَارِضٌ، خَرَجْتُ. جازَ شَرْطُهُ.
فصل: وإن شَرَطَ الوَطْءَ فى اعْتِكافِه، أو الفُرْجَةَ، أو النُّزْهَةَ، أو البَيْعَ لِلتِّجارَةِ، أو التَّكَسُّبَ بالصِّنَاعَةِ فى المسجدِ، لم يَجُزْ؛ لأنَّ اللهَ تعالى قال: {وَلَا تُبَاشِرُوهُنَّ وَأَنْتُمْ عَاكِفُونَ فِي الْمَسَاجِدِ} (٤). [فإذا شَرَط ذلك فاشْتراطُه شَرْطٌ] (٥) لِمَعْصِيَةِ اللهِ تعالى. والصِّنَاعَةُ فى المَسْجِدِ مَنْهِىٌّ عنها فى غيرِ الاعْتِكافِ، ففى الاعْتِكافِ أَوْلَى، وسائِرُ ما ذَكَرْنَاهُ يُشْبِه ذلك، ولا حاجَةَ إليه، فإن احْتَاجَ إليه،
(٤) سورة البقرة ١٨٧.(٥) فى أ، ب، م: "فاشتراط ذلك اشترط".