Yemeni soldiers battled Islamic militants Saturday in an attempt to drive them from several southern towns under their control. The clashes killed 40 people on both sides, officials said.

In a twist, the army commander leading the campaign to drive back the Islamists is among several top military figures who have turned against the country's president and thrown their support behind the massive protest movement pushing for the autocratic leader's ouster.

The commanders who abandoned Yemen's embattled president, Ali Abdullah Saleh, accuse him of trying to sow chaos and letting the southern towns fall into the hands of Islamic militants in an effort to persuade the U.S. and other Western powers that without him in charge, al-Qaeda would take control of the country.

Saturday's fighting around Lawdar and Zinjibar killed 21 al-Qaeda militants, the Yemeni Defence Ministry said. Nineteen soldiers were also killed, said a local government official who spoke on condition of anonymity because he was not authorized to release the information.

The surrounding Abyan province is one of the strongholds of al-Qaeda in the Arabian Peninsula.

It is not clear how closely linked the militants who seized the towns are to Yemen's al-Qaeda offshoot. The area is also home to many other Islamist groups.

In Lawdar, the Islamic militants attacked a vehicle carrying food supplies for a military camp, killing four soldiers, the local official said. In nearby Zinjibar, which Islamic militants seized at the end of May, a local official said army troops were massing at the southern outskirts of the city in preparation for a push to retake the town. Battles there killed 15 soldiers, the official said.

An adviser to the Abyan governor, Gen. Abdel Hakim al-Salahi, who is a member of the ruling party, accused Saleh of having had "a very clear plot aimed at creating chaos in Yemen."

The plan, according to al-Salahi, was for the Islamic militants to control at least five southern provinces "in order to spark the fears of the West and terrorize the people of Yemen."

Al-Salahi said the bulk of the militants involved are from groups that allied with Saleh in the past, during the 1994 war with southern separatists. But other elements have joined them recently, including some believed to have al-Qaeda ties, al-Salahi said.

"Things became very mixed up and the Islamic militants are fighting each other, as much as they are fighting the army units," he said.

General defected

The fight against them is being led by Gen. Faisal Ragab, a battalion commander who defected to the opposition seeking Saleh's ouster in March.

According to a military official close to Gen. Ragab, who is originally from Abyan, the army officers who have abandoned Saleh have made a commitment to fight Islamic militants while holding the president responsible.

He said troops have cornered the militants inside Abyan province and prevented their attempts to push out to other provinces in the south. He spoke on condition of anonymity because he was not authorized to brief journalists.

President Saleh has resisted calls to step down by hundreds of thousands of protesters who have filled the streets of major cities in Yemen since early February, but a deadly crackdown has failed to clear them from the streets.