“The ḥadith of Bilāl is ḥasan ṣaḥīḥ, and the majority of scholars act upon it; they see no harm in praying inside the Kaʿbah. Mālik ibn Anas said, ‘There is no objection to offering a supererogatory prayer inside the Kaʿbah, but I dislike that the obligatory prayer be performed there.’ Al-Shāfiʿī said, ‘There is no objection to performing either an obligatory or a voluntary prayer inside the Kaʿbah, for the rules concerning purification and facing the qiblah are identical for both.’
What al-Shāfiʿī has stated is, God willing, the correct position. Although the ḥadith speaks of a voluntary prayer, it is evident that the obligatory prayer is equally permissible, for the legal rulings governing voluntary and obligatory prayers are the same in what they require, forbid, and allow—save where the Lawgiver has provided a specific exception, and no such exception exists here.
Because the force of al-Shāfiʿī’s argument is so clear, Ibn Ḥazm—well known for his literalism—likewise adopted it. In al-Muḥallā, responding to the followers of Mālik, he writes:
‘No one has ever claimed that the Prayer of the Messenger of Allah ﷺ mentioned here was offered facing anything other than the qiblah. He ﷺ has explicitly stated that the whole earth is a mosque, and the interior of the Kaʿbah is the purest and most excellent part of the earth. It is therefore the finest of mosques and the place most worthy of both obligatory and supererogatory prayers. Except for one who is mounted, in fear, or ill, it is impermissible even for a voluntary prayer to be offered without facing the qiblah. To distinguish between obligatory and voluntary prayers in this matter without Qur’an, Sunnah, or consensus is a mistake. And success is from Allah, exalted is He.’
Despite the clarity of this argument, Shaykh al-Islām Ibn Taymiyyah—may Allah have mercy on him—disagreed and adopted the view of Mālik. In al-Ikhtiyārāt he says: