TEHRAN — Days of protests over dust storms, power failures and government mismanagement in one of Iran’s most oil-rich cities subsided on Sunday after security forces declared all demonstrations illegal.

Residents of Ahvaz, a city with a majority Arab population near the border with Iraq, had been protesting for five days in increasingly large gatherings, shown in cellphone video clips shared on social media.

The region around Ahvaz is a center of oil production in Iran, and since economic sanctions were lifted, Iran’s government has been hoping for foreign investment in the area to update refineries and power stations and fix deepening ecological problems.

The cellphone clips show protesters calling for the resignation of the local governor. And as the number of demonstrators grew, the demands started to include a call for top officials from the capital, Tehran, to come to Ahvaz to see the problems for themselves.

Demonstrators can also be heard shouting, “Unemployment, unemployment,” another big problem in the region, and urging their countrymen to offer assistance: “Iranian compatriots, help us, help us.”

In the weeks before the demonstrations, Ahvaz was hit by large dust storms. Rain turned the dust into mud, which caused power stations to stop working.

Oil production was also affected, with the Ministry of Petroleum reporting that production had temporarily fallen by 700,000 barrels a day.

In addition to the short-term effects of the dust storm, the city is wrestling with long-term environmental challenges.

Ahvaz, home to around one million people, is surrounded by petrochemical factories that emit pollutants on a large scale.

A 15-year drought, in combination with poorly planned dam building, has caused local marshes to dry up, increasing the level of dust particles in the air to record highs.

The World Health Organization said in 2015 that Ahvaz was the most polluted city in the world.

Locals said they felt ignored and had had enough. “We feel as if we live in a special zone, where the government only makes money from,” said Mobin Ataee, a local student. “It seems they would prefer people to leave so they can turn this whole area into an oil-business-only region.”

State television, dominated by hard-liners, highlighted the protests at first, seemingly to place the moderate government of President Hassan Rouhani in a difficult position. One local reporter even presented the news wearing a protective mask against air pollution in protest.

But as the number of protesters started increasing, the official news media fell silent.

On Saturday, the local police issued a statement calling on people to refrain from “illegal gatherings,” warning that they would be “confronted” if they took part.

Witnesses reported the presence of riot police officers on the streets of Ahvaz. The Iranian authorities did not allow a New York Times reporter to visit the city.

“The major part of the flaws and defects have either been resolved or are in the process of being resolved,” said the police statement, published by the semiofficial Fars news agency.

The complex mix of problems facing the city, from dust to water shortages and unemployment, may prove hard to solve.

“The situation is terrible and extremely complex,” said Mitra Hajjar, a prominent Iranian actress and ecological activist.

A photograph of her posing on a landmark bridge in Ahvaz wearing a protective mask was widely shared on Instagram, Iran’s most popular social media tool that is not filtered by the authorities.

“The government is now trying to flood the marshes,” Ms. Hajjar said. “That is a good first step, but basically, we have to restore an entire ecosystem.”

Visitors to the city are often quick to complain of the pollution there, said Forough Emam, 26, an Ahvaz native who moved to Tehran to study. “But for us from Ahvaz, pollution means you can’t see two meters ahead, and everything is covered in brown dust.”

Thomas Erdbrink, New York Times, 19 February 2017