The second is that it is binding. This is the position of al-Shāfiʿī and of Imam Ahmad according to one of the two reports from him. It is also the second view within Abū Hanīfah’s school and the view of Abū Yūsuf. Allah knows best.
He was asked:
An area belonging to a religious lodge lies outside it, and a prayer niche was installed there some years ago. The person responsible for overseeing the premises considers it beneficial to build an upper storey above that prayer niche, either to accommodate the imam or someone who serves the premises, although neither the premises nor its occupants have any pressing need for this. Is that permissible?
He answered:
If that area is not a mosque designated for the five daily prayers, but merely an appurtenance of the premises, it is permissible to construct there whatever serves the interests of the premises. Merely fashioning a prayer niche does not make it a mosque—especially since, if it is a mosque designated for the prayers, the scholars disagree over building above it.