TEHRAN — Some had started praying for rain. Others were thinking about migrating. The mountains towering over the city were bare and brown, deprived of their usual winter dusting of snow.

A full-blown water crisis is drying out Iran, much to the concern of officials who fear protests and strife if conditions do not improve. There is talk of rationing water in the capital, Tehran, one of the largest cities in the Middle East, because the usual autumn rains had not come.

“God is always testing people with various kinds of disasters,” Ayatollah Reza Ostadi, a member of the Supreme Council of Seminaries, said in a sermon on Jan. 19 in the holy city of Qom. “We ask God’s forgiveness for our sins through rain prayers and entreat him to send us his blessing.”