The Saudi-led coalition waging war in Yemen has armed and financed local militias, including some with alleged links to Islamic extremists, that are now turning on one another in a competition for territory, wealth and control over the country’s future.

This internecine fight is aggravating a humanitarian crisis now considered the most dire in the world and clouding the prospects for peace in this crippled country.

Abdullah Abdul Wahed Mansour, right, stands with his comrades on the front line on the north side of Taiz, Yemen. He lost a leg in a land-mine explosion on this same front two years ago.

The violent saga unfolding here in Taiz, the country’s third-largest city, reveals how the wartime decisions made by Saudi Arabia — and its de facto leader, Crown Prince Mohammed bin Salman — are threatening to fuel turmoil in Yemen for years if not decades to come.

“We thought, ‘Thank God they have gotten rid of the Houthis,’ ” said Abdul Karim Qasim, 38, who lives on a street lined with hollowed-out buildings and bullet-pocked houses. “But unfortunately, they have started fighting each other.”

Fatma Ahmed, 11, awaits surgery last month in a hospital in Taiz. She was hit by a bullet and shrapnel while waiting for the school bus as rival militias clashed.

After northern Yemeni rebels known as Houthis ousted the internationally recognized government from the capital, Sanaa, in 2015, Saudi Arabia entered the conflict at the helm of a coalition of Sunni Muslim countries. They sought to restore the president to power and crush the Houthis — Shiite Muslims who have become increasingly aligned with Iran.

The United States is helping the coalition with intelligence, logistical support and billions of dollars in weapons sales. Last month, amid mounting criticism of Saudi Arabia’s conduct of the war, the Trump administration ended its practice of refueling coalition aircraft.

Over the course of the conflict, more than 16,000 civilians have been killed or injured, according to the United Nations human rights office, mostly by airstrikes carried out by the Saudi-led coalition.

The Senate is now considering putting a stop to all U.S. military backing for the coalition. By an overwhelming vote, senators advanced a measure last week that was widely seen as a historic rebuke of the Saudi government for its conduct of the war and its involvement in the killing of journalist Jamal Khashoggi in October.

In Taiz, a centuries-old city known as the cultural capital of Yemen, a ragtag constellation of militias rose up three years ago to fight the Houthis, who had captured it in early 2015. Collectively known as the Popular Resistance, they included fighters linked to al-Qaeda in the Arabian Peninsula, the terrorist network’s Yemen branch, as well as the Islamic State, according to security officials and militia commanders.

“They were not large in numbers, but they were fierce fighters,” said Lt. Col. Mansour Abdurab al-Akhali, Taiz’s police chief, referring to the al-Qaeda forces. “They were on the front lines.”

Buildings in the al-Jahmaliya area of Taiz have been reduced to rubble, first in fighting between Houthi rebels and local militias struggling to retake the city, then in recent clashes among those local militias.

Militia members take positions on the front line on the northern side of Taiz last month. There is sporadic gunfire, but neither the militias nor the Houthi rebels are seriously pushing to gain territory.

By the end of 2016, the militias, backed by the Saudis and the allied United Arab Emirates, had pushed the Houthis to the outer edges of the city. They have remained there ever since, with Taiz forming part of the war’s front lines.

Every day, the sound of heavy gunfire and shelling echoes off the mountains and hills that ring Taiz. A military stalemate has emerged between the coalition-backed forces and the Houthis, who enforce a partial blockade of this city of 600,000 people.

Inside the city, however, tensions have steadily grown as the rival militias, supported by two of the United States’ closest Arab allies, have battled one another.

Fierce clashes broke out in August between two rival proxies of the Saudi-led coalition. Mortars and rocket-propelled grenades pummeled the al-Jahmaliya neighborhood, adding to the wreckage from past years of urban warfare. The residents, including Qasim, cowered inside their homes.

The people of Taiz are trapped in the crossfire of multiple conflicts. Snipers shoot at children. Land mines blow up villagers searching for food. Every armed group has positioned fighters and weaponry in residential areas, endangering civilians.

It is all part of a war that has now brought 14 million Yemenis, more than half the population, to the brink of famine, according to the United Nations’ latest estimate. A cholera epidemic rages in the desperate conditions born of conflict. More than 3 million Yemenis have been driven from their homes.

Students attend class last month at the Sir Alibdaa school, a few yards away from a road exposed to Houthi sniper fire, in Taiz.

Ideological divides

Saudi Arabia and its main ally, the UAE, are united in their vehement opposition to the Houthis but back different pro-government militias based in large part on ideological differences.

Saudi Arabia and influential figures in the ousted Yemeni government of President Abed Rabbo Mansour Hadi are actively backing the forces aligned with an Islamist party known as Islah, viewing the party as central to Yemen’s future. Islah now controls the most powerful military brigades, as well as the security and intelligence apparatus running Taiz.

The UAE views Islah as an extremist wing of the Muslim Brotherhood and supports Islah’s enemies across southern Yemen. In Taiz, the UAE’s primary proxy is the Abu al-Abbas Battalion, part of the army’s 35th Brigade and named after the warlord who leads it. Last year, the U.S. Treasury placed Abbas on a terrorist list of Yemenis, accusing him of links to al-Qaeda and the Islamic State.

In an interview, held inside a large home in the southern port city of Aden, Abbas denied the allegations.

Political and security officials say most al-Qaeda and Islamic State fighters were either killed in clashes or driven out last year in security operations. Yet in an August report, U.N. investigators wrote that jihadist groups continued to operate in Taiz and that “many parties fighting in Taiz have been responsible for civilian casualties.”

People buy khat, a narcotic widely used in Yemen, last month in Taiz. The khat business is in the hands of criminal gangs that fight one another for the control of the market.

A young militia member sits outside the residence of a local military chief.

In the al-Jahmaliya neighborhood, Ahmed Yousef and his 13-year-old son are still recuperating after being wounded in the August clashes between the Islah forces and the Abu al-Abbas Battalion.

A rocket-propelled grenade landed near the pair after they prayed at their mosque, spraying them with hot shrapnel. Yousef said his son went through hours of surgery, and Yousef himself still has pieces of shrapnel in his head and neck.

The rival militias have skirmished over control of checkpoints. In some instances, these clashes have shut down the only road into the city.

The Saudi-backed forces, which now dominate Taiz, have also sought to intimidate, even kill, local leaders in pursuit of financial gain, said security officials.

Ghazwan al-Makhlafi, a soldier in a Saudi-backed brigade, for instance, has formed his own militia and has been battling locals to take control of the lucrative market for khat, a leafy stimulant chewed by most Yemenis. Makhlafi, who comes from a powerful Yemeni tribe, is closely related to the commander of the Saudi-supported brigade and the city’s intelligence chief.

“Money and weapons come into the hands of these powers from all sides. This is the sickness that comes after the great sickness of war,” said Akahli, the police chief.

‘Prolonging the war’

Tensions between the rival militias spiked again in recent weeks after a senior aide to Abbas was killed in a security raid in Aden.

“Under the name of the state, Islah is trying to exterminate us,” said Lt. Col. Mohammed Najib, a top commander of the Abu al-Abbas Battalion. “They want to be the only controllers of Taiz.”

“They are killers and terrorists,” countered Wahib Ali al-Huri, a top battlefield commander in the pro-Islah 22nd Brigade, referring to the Abu al-Abbas Battalion.

As the militias have turned their guns on one another, many residents say, there’s been less effort put into battling the Houthi rebels.

“These internal splits are one of the important reasons why there has been no progress against the Houthis,” said Ahmed Al-Basha, a well-known social activist. “This is prolonging the war.”

It could also be foreclosing the chances of a lasting peace.

Issam Abdulhakim, 11, was injured by Houthi sniper fire while playing soccer with friends near his house in Taiz. He could lose his leg if not treated outside Yemen, but his family cannot afford the transportation and the medical fees.

This week, representatives of the Yemeni government and the rebels are meeting in Sweden for peace talks. But the fault lines in Taiz and elsewhere in Yemen, which have been exacerbated by the Saudi-led coalition’s practice of arming proxy forces, could pose a daunting challenge to restoring stability even if the Houthis lay down their arms.

That’s because the pro-government militias, despite being incorporated into Yemen’s national army, are likely to remain loyal to different warlords, political parties and ideological leanings. Without the Houthi rebels to fight, violence among the groups could escalate.

“The situation would be much worse if there was no common enemy,” said Col. Amar al-Jundubi, 27, chief of staff of a battalion that answers to an Islamist warlord.

For civilians caught in the middle of this multisided conflict, daily life has become ever more perilous and isolated. Most goods are transported six hours from Aden on the one government-controlled road into Taiz, forcing up costs that were already high because of the falling value of the Yemeni currency.

“I can’t even buy milk for my children,” said Mohammed Abdul Karim, 53, a teacher and father of five.

With Taiz considered a security risk, only one Western charity based in the city maintains expatriate staff: Doctors Without Borders. It threads a careful line. It assists al-Thawra Hospital, which is in an area controlled by pro-Islah forces, and two hospitals in the city’s old quarter, controlled by the Abu al-Abbas Battalion, in order not to upset either side.

In the front-line enclave around Al-Thawra Hospital, residents gingerly cross a road flanked by bullet-riddled houses and apartments. To get to school, many children sneak between houses and side paths to dodge Houthi snipers.

Eleven-year-old Issam Abdulhakim ran after his soccer ball when it rolled down a hill and into a rebel sniper’s sight. The first bullet missed a man driving a motorcycle. The second one pulverized the boy’s leg.

“I fell to the ground and began to crawl up the hill,” Issam said from his hospital bed, his voice cracking as he remembered the attack.