Remembrance 4 from Chapter 21
Subḥāna-llāh, wa-l-ḥamdu li-llāh, wa lā ilāha illa-llāh, wa-llāhu akbar.
It is imperative for anyone sitting in the mosque to make the intention for I‘tikāf. This is valid, in our [Shāfi‘ī] opinion, even if one only stays for a moment. One of our colleagues says that I‘tikāf is valid even if one simply enters the mosque and passes through it without staying at all. Anyone passing through [a mosque] ought to make the intention for I‘tikāf so that he may gain the merit of it, according to this person. It is best to stand for a while and then pass on. Anyone sitting in the mosque ought to enjoin whatever good he sees and prevent whatever evil he sees. We are enjoined to do this in places other than the mosque, so in the mosque it is even more essential in order to protect, glorify, dignify and honour it. Our [Shāfi‘ī] colleagues hold that if one enters the mosque but is unable to perform the ṣalāh of greeting the mosque, because of impurity, being busy or any other reason, he should say four times: Glory be to Allah, all praise is due to Allah, there is no god but Allah and Allah is greater. Such was the opinion of one of our righteous predecessors, and there is no harm in it.