would be the case if someone prayed two rakʿahs after the ritual walk between Safā and Marwah, by analogy with the two rakʿahs after circumambulation. Some later scholars of al-Shāfiʿī’s school recommended this. Some later scholars of Ahmad’s school also recommended that a pilgrim entering the Sacred Mosque begin with the prayer of greeting the mosque. In doing so, they contradicted the imams and the Sunnah. Rather, the Sunnah is for someone in the state of ihrām to begin with circumambulation, as the Prophet, may Allah bless him and grant him peace, did when he entered the mosque. This differs from a resident who wishes to pray there without circumambulating: it is good for him to offer the prayer of greeting the mosque.
In short, Allah perfected the religion for the Prophet, may Allah bless him and grant him peace, and his community, and through him, may Allah bless him and grant him peace, completed His favour upon them. Anyone who declares an act obligatory when Allah and His Messenger have not made it obligatory, or [disliked] (1) when Allah and His Messenger have not deemed it disliked, is mistaken. The imams of the religion unanimously agree that nothing is forbidden except what Allah and His Messenger have forbidden, and nothing belongs to the religion except what Allah and His Messenger have prescribed. Whoever departs from these two principles has brought upon himself war from Allah.
Whoever institutes religious practices that Allah has not authorized and prohibits what Allah and His Messenger have not prohibited follows the religion of the people of pre-Islamic ignorance who opposed His Messenger. Allah condemned them in Surahs al-Anʿām and al-Aʿrāf and elsewhere for instituting religious practices that He had not authorized. They prohibited what Allah had not prohibited and permitted what Allah had forbidden, so Allah condemned and censured them for that.
Thus, those who believe in Allah and His Messenger hold as part of their religion that the five legal rulings—declaring something obligatory