'Grave and fragile'

He also said he was "confident" that Pakistan's nuclear weapons were secure, adding: "The Pakistani army ... recognises the hazards of those weapons falling into the wrong hands. We've got strong military-to-military consultation and co-operation."

In depth


 Video: Obama says Pakistan is toughest US challenge
 Video: Turning to the Taliban
 Video: Thousands flee Pakistan Taliban clashes

Media vacuum in Swat valley

Swat: Pakistan's lost paradise
Talking to the Taliban

Pakistan's war

Imtiaz Gul, a political analyst in Islamabad told Al Jazeera: ""The situation here is very grave and fragile ... it flows from the last seven years of the questionable 'war against terrorism'.

"There has been an over-emphasis on the fear of nuclear weapons falling into the hands of militants.

"Pakistan needs not only the United States, but other important members of the international community to stand by it and help it ride out the current turmoil.

"People need investment in infrastructure so they can feel secure, once [this happens], whatever weapons they have ... would also be secure."

Obama's comments came after Pakistani troops were reported to have regained control of the main town in Buner district from the Taliban in the country's North West Frontier Province.

'Stiff resistance'

The Taliban's advance into Buner and Dagar - towns in Buner district - had brought the fighters within 100km of Islamabad, the country's capital, in what was seen as a move to expand their control.

Al Jazeera's Kamal Hyder, reporting from just outside Buner, about 140km southeast of the Afghan border, said: "There is stiff resistance from Taliban in certain areas but the military is still pressing on, using helicopter gunships and even main battle tanks."

The army said it had killed about 50 Taliban fighters and destroyed two explosives dumps. One soldier was killed.

Asif Ali Zardari, the Pakistani president, called on the nation to put political differences aside and support troops fighting the Taliban.

He said in a statement on Wednesday that nationwide support was critical in ensuring the protection of the rights of Pakistani citizens against Taliban advances.

"This is the only way to demonstrate our will, to keep Pakistan as a moderate, modern and democratic state where the rights of all citizens are protected," Zardari said.

Forced from power

"The operation in Buner and Lower Dir is meant to re-establish the writ of the constitution."

About 500 Taliban fighters are in Buner and it may take a week to clear them out, a Pakistani military spokesman said.

Buner, Lower Dir and Swat are covered by the Malakand peace deal, which allows the Taliban to enforce its strict interpretation of sharia, or Islamic law, in the region in return for a truce.

Sufi Muhammad, a local religious leader who has been holding peace talks with the central government, has suspended dialogue with Islamabad as a result of the army assault.

Hyder reported that Sufi said that the military operation would strengthen the "Talibanisation" process in the region.

However, Sufi said that if the government was willing to deliver on the peace deal then those who still fought after any deal clamped down upon.

The Taliban have been using Pakistan's border regions with Afghanistan to launch attacks in both countries since the Islamist group was forced from power in Kabul after the US-led invasion in late 2001.

Tensions between Pakistan and India have heightened recently following the Mumbai attacks in November 2008, which Delhi has blamed on groups from within Pakistan.