Is the obligatory prayer (Fard) valid inside the Kaaba or on its roof?

Chapter on Praying with Impurity and Other Matters

Al-Mughni

Book of Prayer

Book 3 · Issue 1 · Bab 8

Open in Qurani

Primary text

The obligatory prayer is not valid inside the Kaaba nor on its roof. The evidence is the statement of Allah the Exalted: "And wherever you may be, turn your face in the direction of it [the Kaaba]." (Quran 2:144). The one praying inside or on the roof is not facing its direction. Voluntary prayer (Nafl) is based on leniency and ease, evidenced by the allowance to pray sitting or facing a direction other than the Qibla while traveling on a mount.

Supporting text

Al-Shafi'i and Abu Hanifa permitted it, reasoning that the Kaaba is a mosque, and since voluntary prayer is valid there, obligatory prayer should also be valid there, similar to the area outside the Kaaba.