Eight Yemeni soldiers, including an army colonel, and 10 al-Qaida insurgents were killed in violent clashes after militants attacked two military posts in Yemen's southern Shabwa province, according to military sources.

The attack began in the early hours of the morning in the Gol al-Rayda and Azzan districts, lasting several hours, sources told Reuters.

The army colonel who was killed in the attack is yet to be identified, according to a Yemeni Defence Ministry source.

A government campaign to oust Islamists from the districts of Gol al-Rayda, Azzan and the Mahfad District in Abyan province began two weeks ago, leading to a rise in violent clashes.

Military sources said they had forced the militants to retreat despite the casualties.

"Five militant vehicles were destroyed and a number of militants were captured in Azzan in possession of "documents, bombs and explosive belts," said the Yemeni Defence Ministry.

The militants are thought to belong to the al-Qaida in the Arabian Peninsula (AQAP) faction who are waging an insurgency against the Yemeni regime.

The group are said to generally avoid civilian casualties and have had some support in parts of the country where they have restored order.

The government offensive against the militants has seen 37 suspected militants belonging to AQAP killed recently in the town of Meyfaa.

The United States has warned that AQAP are the most dangerous terrorist "franchise" on earth and have launched controversial drone attacks in Yemen, targetting al-Qaida's chief bombmaker Ibrahim al-Asiri.