Shiite rebels holding Yemen's president captive in his home reached a deal with the U.S.-backed leader Wednesday to end a violent standoff in the capital, fueling fears that a key ally in the battle against al-Qaida has been sidelined.

The late-night agreement, which gives the rebels greater say in running the Arab world's poorest nation in exchange for removing its fighters from President Abed Rabbo Mansour Hadi's residence, left unanswered who really controls the country.

In the deal, announced by the official SABA news agency, the Houthi rebels also agreed to release a top aide to Hadi that they had kidnapped in recent days.

The Houthis, who seized control of the capital and state institutions in September, say they only want an equal share of power. Critics say they want to retain Hadi as president in name only, while keeping an iron grip on power.

The power vacuum has raised fears Yemen's al-Qaida's branch, which claimed the recent attack on a French satirical weekly and is considered by Washington to be the terror group's most dangerous affiliate, will only grow more powerful as Yemen slides toward fragmentation and the conflict takes on an increasingly sectarian tone. The Shiite Houthis and Sunni terror group are sworn enemies

After days of violent clashes and the seizure of the presidential palace, aides to Hadi said early Wednesday that he was "captive" in his home after Houthi rebels removed his guards and deployed their own fighters.

Soon after the agreement Wednesday night, there was no visible change in Houthi deployment outside Hadi's house.

While Wednesday's deal stopped short of asserting a Houthi takeover of government, analysts said the Shiite rebels had become Yemen's de facto ruling power.

"The Houthis are in effective control," said Jamal Khashoggi, a Saudi columnist and observer of Yemen's affairs. "Even if Hadi agrees to stay president, he no longer controls Yemen and can't give orders. ... The fear is the country will be dragged toward division and infighting."

Speaking to reporters in Washington, State Department spokeswoman Jen Psaki said, "Clearly, we've seen a breakdown in the institutions in Yemen." However, "the legitimate Yemeni government is led by President Hadi," she said.

"We remain in touch with him. He is in his home," she said, adding that Washington's "ongoing counterterrorism cooperation with Yemen has continued" despite the recent violence.

In a speech late Tuesday, the Houthi's 33-year-old leader, Abdel-Malek al-Houthi, delivered a lengthy ultimatum, warning that "all options are open" if Houthi demands weren't met.

Wednesday's deal bowed to a series of rebel demands, including amendment of a draft constitution and expanded Houthi representation in parliament and in state institutions, SABA said. It also included better representation for Yemen's southerners.

The agreement also calls on Hadi to revamp a commission tasked with writing the draft constitution to ensure greater representation for the Houthis. The draft document had proposed a federation of six regions, something the Houthis reject. Wednesday's deal provided for a federal state, but didn't mention the six-region proposal.

The collapse of Hadi's powers is rooted in Yemen's fractured armed forces, torn between Hadi and his predecessor, deposed President Abdullah Saleh.

Saleh — toppled after more than three decades in power following a 2011 uprising — is accused by many of orchestrating the Houthis' seizure of Sanaa. Critics also say the Houthis have the backing of regional Shiite power Iran, a charge they deny.

Capitalizing on the chaos, Saleh made a rare public statement Wednesday, calling on Hadi to call early presidential and parliamentary elections and urging the cancellation of U.N. Security Council sanctions imposed on him and two Houthi leaders last year after the Houthi seizure of power.

Some fear the Houthi offensive could cause a break up of Yemen, only united in 1990. Political analyst Mansour Hayel said that the Houthis' power grab in the capital could prompt the "fragmentation of all of Yemen," which could become "worse than Somalia."

The violence has taken on a sectarian tone, much to the benefit of Yemen's Sunni al-Qaida affiliate, al-Qaida in the Arabian Peninsula. Over the past months, AQAP has launched deadly suicide bombings targeting Houthi gatherings, marking a shift in their previous tactics of targeting only security forces.

Among Houthi rebel gains Wednesday was the capture of a key military base that houses ballistic missiles outside Sanaa. Soldiers guarding the base offered no residence, said military officials, speaking on condition of anonymity as they weren't authorized to talk to journalists.

Elsewhere, authorities in Aden, the regional capital of southern Yemen, closed the airport there to protest to what local authorities described as a Houthi "coup" against "national sovereignty." Local authorities also closed the port, a major hub in the Gulf of Aden.

___

El Deeb reported in Cairo. Associated Press writer Maggie Michael in Cairo contributed to this report.