Yemeni anti-government protesters hold portraits of Yemeni President Abdrabuh Mansur Hadi during a demonstration demanding the government resign on Feb. 10 in the capital Sanaa. (Mohammed Huwais / AFP)

SANAA, YEMEN — Yemeni President Abdrabuh Mansur Hadi has sacked the military chiefs of two regions following sweeping advances by Shiite rebels and a surge in al-Qaida attacks, state media reported Sunday.

Maj. Gen. Mohammed al-Makdishi, who headed the sixth military command based in the northern city of Amran overrun by Shiite Huthi rebels, was sacked Saturday, Saba news agency said.

Hadi appointed Brig. Mohammed al-Hawry to the post.

The capture of Amran, just 50 kilometers (30 miles) north of Sanaa, threatened a federalization plan that was agreed in February following national talks as part of a political transition.

The rebels, also known as Ansarullah, have complained for years of marginalization in the Sunni majority country, and say the transition plan would divide Yemen into rich and poor regions.

In February they advanced from their mountain strongholds in the remote north towards the capital, battling loyalist troops and pro-government tribesmen.

Huthi rebels said Saturday they agreed to pull out from the city after striking a deal with the defense ministry allowing troops back into Amran.

Hadi also sacked Brigadier-General Mohammed al-Somali, who headed the first military command in charge of the southeastern Hadramawt province, where al-Qaida militants are active.

He appointed Brig. Abdurrahman al-Halili as a chief of the region that has seen a rise in al-Qaida attacks on security forces, including brazen attacks in Sayun.

In late June militants briefly seized Sayun airport in Hadramawt and targeted a military headquarters with a car bomb.

On May 24, militants had launched a massive pre-dawn assault, attacking police and army bases and public buildings in Sayun with suicide bombers, rocket-launchers and heavy machine guns.

The assault killed 15 soldiers and police. Twelve militants also died, three of them suicide bombers.

Sayun is the main town in the Hadramawt valley, a jihadist stronghold in the province’s interior.

Hadramawt’s rugged terrain provides hideouts for militants of al-Qaida in the Arabian Peninsula, considered by Washington as the jihadist network’s most dangerous affiliate.