MARRAKECH, Morocco (AP) — Taps are running dry in southern Morocco, and the government is searching for solutions after people took to parched streets in anger.

Experts blame poor crop choices, growing populations and climate change for the water shortages in towns like Zagora, which saw repeated protests for access to clean water last month.

The shortage of drinking water pushed the impoverished inhabitants of the Zagora region to demonstrate in an unusual outbreak of anger. Twenty-three people were arrested following confrontations with police, and eight were handed sentences last week of two to four months in prison.

Moroccan Prime Minister Saadeddine El Othmani made an exceptional public apology during a Parliament session Monday.

"I apologize publicly to the people of Zagora, because it's the state's responsibility," he said, promising to solve the problem.

Persistent drought in recent years has reduced farm-dependent Morocco's gross domestic product. The government is concerned that the issue of water is becoming a threat to national stability in the kingdom, seen as a steady force in a restive region and key ally with the West in the fight against terrorism.

"The issue of water has always been a priority for Morocco, but today, after two years of drought, we have to move on to higher gear," said the government's secretary of state in charge of water, Charafat Afailal.

Afailal told The Associated Press that several projects are underway to strengthen existing infrastructure, including the Agdez dam and a drinking water treatment plant and building wells.

Although water supplies have been restored in Zagora in recent days, residents complain about its poor quality.

"For the last 15 years, the inhabitants of Zagora have been buying drinking water because tap water is undrinkable. We only use it for cleaning," said Atmane Rizkou, president of the Moroccan Association of Human Rights in Zagora.

But since the summer, "the problem has worsened," he said. Dry taps hit women particularly hard, forcing them to go farther and farther afield to draw water to quench children's thirst and wash family dishes and laundry.

One culprit: watermelon farming. With a consumption of 7 million cubic meters of water per year, according to a study by the regional hydraulic basin agency, "the watermelon greatly contributed to the water stress in the region," said Jamal Akchbab, president of the Association of Friends of the Environment in Zagora.

David Goeury, a geographer at Paris IV-La Sorbonne University, said the problem has been brewing for years and some have sought a ban on watermelon farming.

"The problem is that watermelon demands a lot of water, and requires drilling. If the water table is overexploited, its water level will drop or the quality of the water will be altered because it will come into contact with saltwater," Goeury said.

Zagora "must completely change its drinking water supply model, and get supplies upstream, from a dam," he added.

The drought in Morocco has pushed rural people toward the city each year. While 90 percent of Moroccan households in urban areas are connected to the drinking water system, the connection rates in rural areas barely reach 40 percent.

Zagora is not the only locality affected by this problem, and residents of the remote villages of Beni Mellal, Khenifra, Taounate and Ouazzane have also demonstrated for access to drinking water.

Rainfall across Morocco has been declining, and the country has experienced an "acceleration of extreme events, including droughts and floods, an increasing trend of heat waves and cold waves, and rising sea level," according to a report from the Ministry of Energy, Mining and the Environment.

A 2011 report on the effects of climate change on groundwater resources by the International Association of Hydrogeologists said "water deficiency and water quality degradation have important implications for future economic growth and political stability in Morocco, as water authorities are already struggling to distribute and provide potable water to the domestic and agricultural sectors."

Faced with the proliferation of water demonstrations, King Mohammed VI last month ordered the creation of a commission, tasked with making an emergency plan that lists water shortages and proposing ways to invest in solving the problem.

The Moroccan government is already working to build dams, wastewater treatment plants and desalination plants. A water route that will cost nearly $3.6 billion aims to transfer 850 million cubic meters of water per year from the north of Morocco to the south, which is experiencing growing water stress.