At least 23 people have been killed after suspected al-Qaeda fighters simultaneously attacked two army positions in southern Yemen, highlighting a deteriorating security situation which is the toughest challenge facing the government.

General Mohsen Saeed al-Ghazali, an aide to the country's defence minister, nine other soldiers and 13 fighters died in the clashes, which focused on military positions in Azzan and neighbouring Jul al-Rida, the army said on Wednesday.

The attacks come five days after Defence Minister Mohamed Nasser Ahmad and two senior security officers survived an ambush as they returned from the south, where the army is pursuing a fortnight-long campaign to clear the area of al-Qaeda fighters.

"The toll of the clashes between the army and terrorists have left 10 soldiers dead, including a general, and 13 in al-Qaeda ranks," a military officer told the AFP news agency.

"The Yemeni air force is participating in the battles, bombing columns of al-Qaeda vehicles trying to advance towards Azzan," the Shabwa provincial city the army said it retook last Thursday, the source said.

He said the situation there is now "under control".

Army operation

The army says it has inflicted heavy losses on al-Qaeda in the Arabian Peninsula (AQAP), seen by the US as the network's deadliest franchise, since it launched the offensives against them on April 29.

The authorities in Sanaa have put security forces in the capital on alert for revenge attacks following the army's recapture of Azzan, with the US also closing its embassy.

The Interior Ministry said this week that checkpoints were set up around the provinces of Sanaa, Ibb, Baida, Lahij and Marib to prevent the entry of fighters fleeing the offensives focused on Shabwa and Abyan - both in the south.

"This is something that highlights the biggest challenge facing government troops in Shabwa, in particular," Al Jazeera's Hashem Ahelbarra, reporting from Sanaa, said.

"They [the government] say they made some significant military gains but they haven't been able to defeat al-Qaeda. Militants are still able to retreat, regroup, take advantage of the terrain they know so well, and launch surprising attacks like the one they launched," said Ahelbarra.

AQAP took advantage of a 2011 uprising that forced veteran president Ali Abdullah Saleh from power to seize large swathes of southern and eastern Yemen.

The army recaptured several major towns in 2012 but has struggled to reassert control in rural areas, despite the backing of fighters recruited among local tribes.

"Houta, al-Qaeda's last stronghold in Shabwa, has tribesmen who are trying to negotiate a deal with the armed group, which would grant its members safe passage in exchange for retreating from the whole area," said Ahelbarra.

"The Defence Ministry has just said it rejects any deal, and that al-Qaeda fighters have one of two options, either to surrender or get killed."

Source: Al Jazeera and agencies