KABUL, Afghanistan - The few remaining militant fighters in a key southern town ended their resistance Tuesday, a day after Afghan and foreign troops moved into the community and forced the insurgents to flee, Afghanistan's Defense Ministry said.

The Taliban had held Musa Qala since February, and Afghanistan's president said the successful attack was aided by some local Taliban leaders switching allegiance to his government.

Visiting British Prime Minister Gordon Brown predicted developments in Musa Qala would have positive long-term results, and the success boosted hopes the Afghan government can expand into a key opium producing area where it now wields little influence.

But Musa Qala has bounced back and forth between government and Taliban control despite the presence of British troops nearby, and it remains to be seen whether overstretched Afghan and NATO troops can hold the town.

Some 7,000 British soldiers have faced fierce battles in northern Helmand province this year, in Kajaki, Sangin, Gereshk and Musa Qala. It is the world's largest opium poppy growing region, and provides the Taliban with tens of millions of dollars.

President Hamid Karzai said the decision to enter Musa Qala came after local Taliban commanders agreed to side with the Afghan government because of brutality committed against townspeople by the Taliban, al-Qaida and foreign fighters.

At least 10 Taliban were reported killed Monday, in addition to more than a dozen killed since fighting intensified Friday.

NATO's International Security Assistance Force said NATO and Afghan troops entered the outskirts of the main part of Musa Qala but would proceed cautiously into the town center because the militants had rigged improvised explosive devices.

A Taliban spokesman, Qari Yousef Ahmadi, on Monday confirmed the militants gave up Musa Qala, but said they left only to avoid civilian casualties.

A resident of Musa Qala, Haji Mohammad Rauf, said he saw Taliban fighters leave in trucks and motorbikes around midday. Two hours later, hundreds of Afghan soldiers streamed in and established security checkpoints, he said.

"I was standing on my roof and saw hundreds of Afghan soldiers drive into town," Rauf said. "All the shops are closed and families are staying inside their homes."

In Kabul, during a joint news conference with the British prime minister, Karzai said Taliban brutality in Musa Qala played a significant part in leading to the attack.

He told of a 15-year-old boy accused of spying by the Taliban who was hung from a ceiling and roasted to death by a gas-fed fire started beneath him. The next morning the militants told the boy's mother she could pick up her son, the president said.

"When she entered the room she found the charcoaled dead body of her son," Karzai said. "Some of the Afghan Taliban who also witnessed atrocities like that, they came and they met with me and they asked me to intervene and (said) that they will switch sides and that is what's happened."

Taliban militants overran Musa Qala in February, four months after British troops left under a controversial peace agreement that gave security responsibilities to town elders. The deal had been privately criticized by U.S. officials as a surrender to the Taliban.

NATO and Afghan forces will have to work hard to hold the town, which lies in a region that has seen fierce fighting this year , the deadliest year in Afghanistan since the U.S.-led invasion that overthrew a Taliban government in 2001 for harboring Osama bin Laden.

Lt. Col. Richard Eaton, a British spokesman, said NATO wouldn't take Musa Qala without a plan to hold it. He said a unit of predominantly Afghan soldiers would be stationed in town.

Brown, who visited British troops in Iraq before coming to Afghanistan, said Monday he had "no doubt" the Musa Qala operation would be successful and that social and economic progress would follow.

"In Musa Qala the action has been taken, and I think we will see in the next few days in Musa Qala that the action will be effective, that it will work and it will bring long-term and lasting results," he said.

During a stop at Camp Bastion in Helmand province, Brown thanked about 150 British soldiers for their "patriotic service."

"It is one of the most difficult of tasks. It is the most testing of times and it is one of the most important of missions, because to win here and to defeat the Taliban and make sure we can give strength to the new democracy of Afghanistan is important to defeating terrorism all around the world," he said.

Brown's visit to Iraq on Sunday signaled the start of what Britain hopes will be the transition from a military mission there to one focused on aiding the economy and providing jobs. His speech was met with enthusiastic applause from British troops.

His speech in southern Afghanistan was more subdued, as was the resulting applause, perhaps reflecting the serious fight that British soldiers find themselves in.

"We have an operation ongoing in Musa Qala, we've just had people die, so it's a different tempo," said one officer, Lt. Andy McLachlan.

,,,

Associated Press writers Jason Straziuso, Fisnik Abrashi and Amir Shah in Kabul and Noor Khan in Kandahar contributed to this report.