AL MUKALLA, Yemen — The exiled Yemeni government said Friday that Saudi-backed fighters had “completely liberated” the southern city of Aden from the Houthi rebels who had tried for months to bring it under their control.

Witnesses in the city said that at least one neighborhood was still contested and that Houthi snipers remained active in several others. But rapid gains by the anti-Houthi fighters over the past few days appeared hard to reverse and potentially gave Saudi Arabia, which has been bombing the Houthis since late March and backing their opponents, its first battlefield victory.

The Yemeni prime minister, Khaled Bahah, called the gains a “historic moment” and said his government would quickly turn to repairing the devastation in Aden. The steady destruction of the city, Yemen’s second largest, has come to symbolize the hardships and horrors visited on civilians, including shelling, airstrikes and chronic shortages of water and electricity.

Of the more than 3,000 people who have been killed across Yemen since March, mostly civilians, hundreds died in Aden alone, caught in close-quarters fighting between the Houthis and their allies on one side and an assortment of armed forces, mostly local fighters, on the other.

With the Houthis still in control of broad parts of northern Yemen, including Sana, the capital, it remained to be seen whether the capture of Aden by the Saudi-backed forces would bring about a broader shift of momentum in the conflict. The fight has aggravated the regional rivalry between Iran and Saudi Arabia and emboldened extremist groups operating in Yemen, including a new branch of the Islamic State.

In dueling, combative statements on Thursday, Yemen’s exiled president, and his opponent, the Houthi leader, vowed to continue fighting. Abdel-Malik al-Houthi, the rebel leader, urged Yemenis to “intensify efforts” to “defeat the aggressors and preserve the country from the desecration of the occupiers.”

The president, Abdu Rabbu Mansour Hadi, hailed the victory of the “resistance” in Aden and vowed to reverse what he called a coup.

Saudi Arabia launched its military offensive to restore Mr. Hadi after he was ousted and fled into exile as the Houthis advanced across Yemen. The Saudis were driven largely by their view of the Shiite-led Houthis as clients of Iran, their regional nemesis — a view that many, including the Obama administration, said exaggerated Iran’s influence.

The Saudi-led coalition has staged thousands of airstrikes in the country, undeterred by a growing humanitarian crisis in Yemen, the region’s poorest country, and the rising civilian toll, including hundreds of deaths from the airstrikes. Criticism of the Saudi strategy intensified as the Houthis mounted incursions into Saudi territory and fired ballistic missiles across the border, undermining Saudi claims to have destroyed the Houthis’ heavy weapons.

The Houthis, who easily took Sana in part by seizing on popular antipathy against Mr. Hadi’s government, have also carried out an unrelenting military campaign aided by military and security units loyal to a former Yemeni president, Ali Abdullah Saleh. Together, they laid siege to Aden and Taiz, a central Yemeni city, while asserting that those who opposed them were extremists in Al Qaeda’s Yemeni affiliate.

The battle for Aden shifted on Tuesday, when the Saudi-backed forces took control of the city’s international airport and a major coastal neighborhood. The advance appeared to be the fruits of a push by the Saudis and their allies to establish a beachhead for Mr. Hadi’s government. It remained to be seen whether Mr. Hadi, who has little support within Yemen, would return to the country as leader or instead delegate power to Mr. Bahah, his far more popular deputy.

Witnesses in Aden said Saudi-trained troops joined the battle on the side of anti-Houthi militias, which had armored vehicles supplied by the United Arab Emirates, a Saudi ally. On Friday, the Houthis controlled only Aden’s Tawahi neighborhood, witnesses said.

Analysts said the Houthi withdrawal from Aden potentially opened up new possibilities for a negotiated cease-fire by upsetting the balance in the stalemated fight. But it was just as likely to set off new conflicts in Yemen, including struggles among political forces that had united against the Houthis but that had often clashing long-term agendas.

The battle in Aden had brought together, among others, separatists who have long advocated an independent state in southern Yemen and Islamists with allegiances to northern political elites who favor a unified country.

“The war might end soon, but that does not mean peace in Yemen will come soon,” said Farea al-Muslimi, a Yemeni visiting scholar at the Carnegie Middle East Center in Beirut, Lebanon. “There has never been a moment when Yemeni social cohesion was torn so quickly and so badly.” The honeymoon between southerners and the Islamists is “already over,” he added, mentioning local conflicts between the groups.

The absence of a broader political solution could lead to a power struggle between Mr. Hadi’s government and the forces it was relying on to fight the Houthis, Mr. Muslimi said.

With the battle barely ending in Aden, members of the so-called Southern Movement had already raised their flag, not the Yemeni flag, over public buildings. “Most of the southerners reject unification,” said Nasser al-Fadli, an activist with the Southern Movement. “We sacrificed many martyrs to establish our southern state.”

This article was published on the New York Times