Yemen President Abed Rabbo Mansour Hadi had agreed to demands that included giving the Shiite Houthi rebels greater powers, but he and his cabinet resigned Thursday. (Jason DeCrow/AP)

Yemen’s Western-backed president and his cabinet resigned Thursday amid deepening turmoil that left Shiite rebels in effective control and threw into question this nation’s continued participation in the U.S. fight against terrorism.

As President Abed Rabbo Mansour Hadi succumbed to an apparent coup attempt by the rebels, a government official confirmed that Hadi had lost control over the military and intelligence agencies that coordinate with the United States in operations against al-Qaeda’s most dangerous affiliate.

The crisis threatens to weaken Washington’s campaign against al-Qaeda in the Arabian Peninsula (AQAP), which is based in Yemen and has actively targeted the United States and Europe. The government’s collapse could also plunge Yemen into full-scale civil war. The Houthi rebels are widely ­considered to be backed by ­Shiite-majority Iran, although they deny it. Yemen’s population is majority Sunni, and there is a strong separatist movement in the Sunni-dominated south.

The resignations in Yemen are likely to set off alarms not just in Washington but in Sunni Arab capitals, especially in neighboring Saudi Arabia, which has backed Hadi’s government with billions of dollars and views Iran as its foremost regional rival.

Hadi and his government resigned just a day after agreeing to a power-sharing deal that extended the Houthis’ control over Yemen. The 69-year-old president, a former major general, initially appeared ready to ride out the chaos under the arrangement with the rebels.

But government officials accused the insurgents, led by Abdulmalik al-Houthi, of failing to uphold their side of the agreement, refusing to pull back from positions they had taken around the presidential palace and residence, and continuing to hold a Hadi aide who was kidnapped by the group Saturday.

“They have been applying too much pressure on him,” presidential adviser Yaseen Makawi said by telephone. Hadi “had no choice but to resign,” Makawi said.

In a letter to the chairman of parliament, the president alluded to the Houthi offensive, which began in September, as the reason for his resignation, although he did not mention the insurgent group by name.

“I would like to apologize personally to you and to the parliament and to the Yemeni people now that we have reached a dead end,” he said in the statement, which was reported widely in Yemeni media.

Prime Minister Khaled Bahah, who was besieged by the Houthis at his palace this week, said in a Facebook posting that he stepped down to avoid being drawn “into an abyss” in which the country had policies “based on no law.”

“We don’t want to be a party to what is happening or will happen,” he added.

One of Hadi’s advisers, Sultan al-Atwani, said the mass resignations resulted from frustration over the Houthis’ stripping the president of all powers — including over the military and intelligence agencies — even though they had signed the power-sharing deal. The president was stripped of his authority to coordinate on U.S. drone strikes aimed at al-Qaeda targets, he said. Atwani added that he no longer had the authority to coordinate with a U.S. drone program that attacks AQAP militants.

Hadi took power in 2012 after an Arab Spring uprising led to the ouster of President Ali Abdullah Saleh. Many Yemenis suspect Saleh aided the Houthi advance and plotted against the president. The U.N. Security Council imposed sanctions on Saleh and two Houthi leaders in November for threatening Yemen’s stability.

“Hadi has lost control of the military. He doesn’t have the power to give orders to the military,” Atwani said by telephone.

There was no immediate response from officials in Washington.

The Yemeni government was formed in November as part of a peace deal brokered after the Houthis overran the capital in September and captured large swaths of territory, including nine provincial capitals.

It was not immediately clear whether the rebels now have full control over the intelligence branches, but analysts said the developments spelled trouble for continued Yemeni counterterrorism coordination with the United States — notably on the drone program.

“It’s expected that the Houthis are going to change the composition and focus of the intelligence services to gear them toward maintaining Houthi influence, primarily,” said Lina Khatib, director of the Carnegie Middle East Center. “This would divert attention away from counterterrorism operations.”

Houthi officials have said they oppose the U.S. drone program, calling it a violation of Yemen’s sovereignty. Houthis are Zaydis, a branch of Shiite Islam whose followers form roughly a third of Yemen’s population of 24 million. Although natural enemies of Sunni al-Qaeda, the Houthis would probably suspend their country’s participation in the drone program because it is highly unpopular among Yemenis because of civilian casualties from the airstrikes, said Ali Shantoor, a retired Yemeni brigadier general.

“Abdulmalik al-Houthi and the Houthis will refuse to cooperate with the United States in carrying out drone attacks,” he said. “They’ve always said that they reject the United States’ control and its violation of the sovereignty of the country.”

Houthis have been battling AQAP during their assaults. The al-Qaeda group claimed responsibility for a Jan. 7 attack in Paris on the satirical newspaper Charlie Hebdo that left 12 people dead and set off three days of violence.

The Houthi rebels, meanwhile, appeared to be preparing an advance on central Marib province, the country’s main oil and gas region. Yemen’s exports are tiny compared with those of its energy-rich neighbors, but the revenue is critical in the Arab world’s most impoverished nation.

The Houthis tried to seize an army base about 90 miles from Marib in preparation for a likely assault on the province, said Ali al-Ghulaisi, a spokesman for Marib’s governor. He said military officials, tribal leaders and party chiefs gathered in the province’s main city Wednesday to discuss preparations in the event of a Houthi assault.

The Houthi attack on the military base “is an attempt to increase the areas they control, in addition to securing supply lines for them, so that they can attack Marib,” Ghulaisi said by telephone.

For Saudi Arabia, in particular, the ascendance of a Shiite-dominated state on its doorstep represents a strategic threat. It sees Iranian proxies consolidating power on its southern border with Yemen and on the northern one with Iraq, which is led by a Shiite government that has growing political, military and economic ties with Tehran, said Mustafa Alani, director of security and terrorism at the Geneva-based Gulf Research Center.

“This is becoming a strategic nightmare” for Saudi Arabia, he said. The collapse of Yemen’s government came as Saudi Arabia’s leadership was in flux, with official media reporting early Friday that King Abdullah had died.

The Houthis reject accusations that they are Iranian proxies. They have defended their offensive as an attempt to root out corruption.

Naylor reported from Beirut. Brian Murphy and William Branigin in Washington contributed to this report.