What happened to public baths in the Islamic world?

by Seswatha

Aside from the famous Turkish baths, in various historical books I've read, I've seen public baths referenced in the Middle East prior to the Ottomans, and even in Islamic parts of India.

From personal experience, I've never seen one in Pakistan, but apparently they used to be attachments to many old mosques (which today might have an area for doing the ritual ablution, but nothing something worthy of the name public bath). Either the mosques were expanded into the bath area or the baths were knocked down.

What was the cause of their apparent decrease in popularity? Was it the introduction of running water? Because, at least in Pakistan, it seems that for many people, the closure of public baths preceded reliable household running water.

parles

I would question the underlying assumption that they have declined across the entire Islamic world. I know they still exist in Morocco, for example.