Yemeni security forces drove Al Qaeda-linked militants out of part of a southern city they have held for nearly four months, a military official said, in the first significant victory against the fighters.

Months of ground battles and airstrikes have failed to shake the city of Zinjibar and another town out of the hands of Islamic militants who overran them in April and May.

The fighters, some suspected of links to Yemen's Al Qaeda branch, swept into the area while President Ali Abdullah Saleh's government had its attention elsewhere, trying to crush massive street protests calling for the longtime leader's ouster.

The government said in an official statement Saturday that it had retaken all of Zinjibar, the capital of Abyan province. But a military official disputed that, saying only an eastern section was under government control and that fighting continued in other parts of the city late Saturday.

Some militants stole police vehicles and were seen fleeing Zinjibar for the city of Code, the official said, speaking on condition of anonymity because he was not authorized to release information to journalists.

Saleh, who is still recuperating in Saudi Arabia after a June attack on his compound in Yemen's capital, Sanaa, said the United States and Saudi Arabia have supported the effort to retake the southern towns from militants and he thanked them. He did not elaborate.

A Yemeni security official at the Defense Ministry said the United States has used drones and warplanes in attacks on the two towns. He said they also helped Yemen with reconnaissance flights over areas of Abyan province and provided information on fighters and their movements.

The U.S. has given Saleh's government millions in aid to battle militants from Al Qaeda in the Arabian Peninsula, which Washington considers the terror group's most dangerous and active branch.

The group has been linked to plots that include the failed attempt to blow up a U.S. airliner bound for Detroit in December 2009 with an explosive device sewn into the underwear of a would-be bomber.

Saleh has seized on those fears, warning the West that if he were to heed protesters' calls to step down, Al Qaeda would take control of the country.

His political opponents have accused him of initially allowing the militants to take over Zinjibar and the town of Jaar to stoke those fears.

Opposition spokesman Mohammed al-Sabri repeated those accusations Saturday. He said Saleh allowed the militants easy access to police headquarters where vehicles, ammunition and weapons were seized in June.

Al-Sabri said Saleh wanted to sow chaos in five key provinces to deflect international calls for his resignation. He wanted Western allies, such as the United States, to choose between insecurity or his rule, al-Sabri said.

A former interior minister, Hussein Mohammed Arab, also accused Saleh of having a hand in the militant takeover. In a joint statement with the opposition, he said militants took over Zinjibar with no resistance after security forces withdrew without explanation.

There has been no official response to the allegations.

The militant takeover of Zinjibar forced more than 100,000 residents to flee for safety, many seeking refuge in schools and apartments in the neighboring province of Aden.