connected to the Ka'bah and built as part of it. Accordingly, if he performs a voluntary prayer facing the direction of the door while it is open, while he is inside the Ka'bah, it is not valid, because there is no upright part of it before him. If he places one or two bricks before him, it is likewise not valid, because they are not part of it and are not connected to it.
Some scholars said that a voluntary prayer inside the Ka'bah is valid even if there is no upright part of it before him (1). They cited as evidence that what is obligatory is to face the airspace, and the airspace follows the ground beneath it. They said: Thus, if one prays on a mountain higher than the Ka'bah, such as Mount Abu Qubays—at the foot of which is al-Safa—there is no doubt that the Ka'bah is below him and that no upright part of it stands before him; yet the prayer is valid by consensus (2). Likewise, if one performs a voluntary prayer inside the Ka'bah, it is not a condition that an upright part of it stand before him.
However, this analogy is questionable, for someone praying toward the Ka'bah from a higher place sees something upright before him, even if it is not directly opposite him. Thus, the analogy is invalid, unlike the person who has absolutely nothing before him while he is inside the Ka'bah itself. There is a difference between the two cases.
There is no doubt that the cautious course is for an upright part of it to be before him. Yet, if someone has already prayed and comes to us seeking a legal ruling, we cannot say, “Your prayer is invalid.” Rather, before he prays, we instruct him not to pray inside the Ka'bah except facing an upright part of it.
For this reason, when the Ka'bah was demolished during the time of Abdullah ibn al-Zubayr, he erected wooden frames and hung coverings over them (3), so that people could pray toward them. Shaykh al-Islam said: “This is evidence that there must be an upright object toward which one prays” (4).