The call to prayer played over loudspeakers while young men and boys raced across scorching concrete to line up for a plunge down a sun-faded water slide, a new way to beat the heat in a furnace-like Iranian summer.

The kinds of water parks popular in American suburbs have begun to open their doors in the Islamic republic — albeit with single-sex restrictions — and their popularity is skyrocketing. The parks have brought welcome relief to young people suffering through the hottest Iranian summer in nearly a half-century — one that has coincided with the holy month of Ramadan, when Muslims are expected to fast from sunrise to sundown.

Iranians have long complained about a lack of recreational opportunities, and the advent of the water parks — including a sprawling, open-air facility run by Tehran’s municipal government — suggests that public officials and private-sector investors see opportunity in offering citizens new ways to have fun.

The public water park in Azadegan, in the dusty southeastern corner of the capital, is surrounded by agricultural land and the vast mausoleum that houses the remains of the Islamic republic’s founder, Ayatollah Ruhollah Khomeini. On a recent afternoon, 12-year-year-old Ali Oliazadeh splashed contentedly in the man-made river as temperatures climbed past 100 degrees yet again.

On an average weekday summer afternoon, the water park attracts about 2,000 young men during hours set aside for males only. Alternate hours are allotted for women and girls, who increasingly arrive in large numbers, water park operators said. The approach gives participants a way around restrictions that otherwise require women in Iran to cover their heads and bodies when in public, operators said. (A male reporter and photographer were not allowed access to the park during female-only hours.)

With an entry fee equivalent to $1.60 per person, a trip to the water park is affordable for most Iranians, but as prices rise and incomes stagnate, opportunities to have fun are dwindling for many families.

“Last year I came every week, but the ticket is much more expensive now, and this is the first time I’ve been here this year,” said Oliazadeh, whose family lives in the neighborhood.

Mashhad, Iran’s holiest city and its top destination for religious tourists, has three water parks. A facility opened this winter in the southern city of Ahvaz, and another is set to open in the coming weeks in the northern city of Tabriz. Another project is scheduled for the outskirts of the holy city of Qom, and organizers there say it will be the largest in the Middle East.

Some analysts expect the government’s approach to recreation to loosen up further under President Hassan Rouhani, who was inaugurated Sunday.

“Having fun and recreational activities gives hope and promotes psychological health, and if these are taken from people, they become more susceptible to depression and sadness, and it can affect their social behavior,” said Behnam Khaledi, a researcher and instructor in the department of social sciences at Kermanshah University.

At Azadegan, many unemployed young men pass time, while military conscripts who otherwise joke with lifeguards and visitors are posted to provide security. “We have a scuffle here every few weeks, so it’s good to have someone watching over things,” Majid Shamshiri, a park manager, said.

Massoud Shad and Saeed Ahmadi, high school classmates and recently unemployed office workers, visit water parks regularly. “These days, we have nothing else to do,” Shad said.

Like most single Iranians, both men live with their parents, and as inflation and unemployment soar, the parks provide an alternative to aimlessness.

Although Shad and Ahmadi enjoyed their day at Azadegan, both said they prefer a more expensive and privately run water park called Pars Aqua Village. But neither can afford the ticket at the moment. “The facilities are so much better there,” Ahmadi said. “But this is better than sitting at home.”

The Pars facility — housed in a 150,000-square-foot hangar that is dotted with fake palm trees, concession stands and a restaurant shaped like a wooden sailboat — includes slides, a wave pool and a winding river, all imported from Turkey. The complex lies in an industrial area about 10 miles outside Tehran. When completed, the complex is expected to include a large shopping mall and hotel.

Even discounted tickets marketed by text message cost about $8 per person, about five times as pricey as tickets at the Azadegan water park, but even in the nation’s difficult financial climate, Pars attracts just as many visitors as Azadegan on an average day, operators say.

Ali Pooyan, director of public relations at Pars Aqua Village, said that although securing permission to build the park and complying with the restrictions of the Islamic authorities was challenging and costly, the business is a very profitable.

The Pars ownership is “satisfied it can help people have fun at a reasonable price compared to other recreational activities both in and out of Iran,” Pooyan said.

“Plus, for those who very religious, this is a good place as men and women are not mixed.”