Ahmad, Abū Dāwūd, and Ibn Mājah narrated from the Prophet, may Allah bless him and grant him peace, that he said:
“The whole earth is a place of prayer except graveyards and bathhouses.”
This is the report on which they relied concerning prayer in bathhouses. Some transmitted it with the Companion omitted from its chain, while others transmitted it with a connected chain and judged it established. His exclusion of bathhouses, like graveyards, from the earth’s being a place of prayer indicates that they may remain and that using them is not categorically prohibited. For if they had to be demolished, and building and entering them were forbidden, prayer would not have been singled out for prohibition.
Regarding the prohibition of prayer in bathhouses, some scholars of our school, such as Abū Bakr and al-Qādī, held that anyone who prays there must repeat the prayer. It has been said that this is because bathhouses are haunts of devils. Another juristic view bases the ruling on the likelihood of ritual impurity. The well-known position is that the prohibition extends to everything included in the sale of a bathhouse: the changing room, the washing area, and the andar.
It may, however, be argued that hammām follows the pattern fa‘‘āl and is derived from hamm (heat): it is the place containing hot air and hot water, where one is exposed to them. As for the changing room, where clothes are left, it is cool, no washing takes place there, and only clothed people sit there. It is therefore not itself a bathing space, nor is there a valid rationale for including it in the prohibition.