Yemen's president, Abdrabuh Mansur Hadi, has sacked the military chiefs of two regions following sweeping advances by Shia rebels and a surge in al-Qaeda attacks, state media has reported.

Mohammed al-Makdishi, a major general, was sacked from his command in the northern city of Amran after its takeover Shia Houthi rebels, the Saba news agency said on Sunday.

Hadi also sacked Mohammed al-Somali, a brigadier-general who commanded the southeastern Hadramawt province, where al-Qaeda fighters are active.

The capture of Amran, just 50km north of Sanaa, threatened a federalisation plan that was agreed in February following national talks as part of a political transition.

Houthi rebels agreed to pull out from the city on Saturday after striking a deal with the defence ministry allowing troops back into Amran.

Hadramawt, meanwhile, has been the scene of several attacks by Sunni rebels linked to al-Qaeda, the latest being an attack in June on Sayun airport and a car bomb and gun attack on a nearby military base in May which killed 15 soldiers and police.