Has the Pakistani government, after years of vacillation, finally gotten serious about eliminating the Taliban threat? Maybe. For the first time since 9/11, Pakistan's army has engaged in a decisive military offensive to drive the Pakistani Taliban and other extremist groups out of South Waziristan, one of seven tribal agencies that border Afghanistan.

But it remains to be seen whether the government will be able to overturn the Pakistan Army's long-time support for the Taliban.

I interviewed dozens of refugees from the Swat Valley who have swamped Mardan, a town in the North West Frontier Province. Many said they would not return home until the army has removed the Taliban from the area.

"We watched the army play games for two years, allowing the Taliban to take over the valley, allowing their radio stations to broadcast hate, allowing them to terrorise us," a man from Mingora, in the Swat district, told me.

"We will go back when the leaders of the Taliban are dead."

The Swat refugees are worried because the government is pressuring them to return home even though not a single Taliban leader was killed in the offensive - they all managed to escape.

On June 15, General Ashfaq Kayani, who leads the army, declared unequivocally that the Taliban chiefs were "not fighting for Islam" and "must be eliminated".

The army has now deployed in South Waziristan, where the chief of the Pakistani Taliban Baitullah Mehsud, along with the Afghan Taliban and Al Qaida leaders is believed to be hiding.

This is hopeful news. But the army will have to take a different path than in the past. Since 2005, the army and its intelligence services have launched periodic offensives against the Taliban along the Afghan border, only to pull back, holding talks and conducting ceasefires.

In the NWFP, in the autonomous tribal agencies known as the Federal Administered Tribal Agencies (FATA), the army has failed to protect pro-government tribal elders and chiefs. More than 300 were killed by the Taliban and Al Qaida, and hundreds more fled the region.

Just recently, a tribal leader who had switched sides from the Taliban to the government was shot dead by the Taliban. The disappearance of that traditional leadership, which supported Islamic moderation, tribal culture and the code of the Pashtuns, allowed the Taliban to extend its writ over the whole region.

Protecting the population, especially those loyal to the government, is the very first lesson in counter-insurgency, but the army failed to apply it in FATA. It cannot afford to make the same mistake in South Waziristan.

The army's offensive in the FATA region is crucial to global security because the area is home to Al Qaida and numerous allied groups. But it will not be easy. The mountainous region lacks infrastructure and is now in the hands of the Taliban. The army's paramilitary troops have never won a decisive victory there.

This time, regular troops will be involved too, and American forces on the Afghan side will prevent the Taliban from escaping into Afghanistan. But the Taliban and its allies are expected to create a distraction by opening new fronts in Punjab and intensifying suicide bombings in Pakistani cities.

A key determiner of success will be the army's attitude towards the Afghan Taliban. After the Taliban was stripped of power in Afghanistan in 2001, the regime of former Pakistani president Pervez Musharraf gave refuge to the Afghan Taliban leadership and thousands of fighters.

Using bases, recruitment and logistics in Pak-istan, they revived their movement in Afghanistan in 2003 and today control much of southern and eastern Afghanistan.

Despite the presence of about 100,000 US and Nato troops, Taliban attacks in Afghanistan soared by 59 per cent in the first five months of 2009 compared with the same period last year. In a single week in mid-June, there were more than 400 Taliban attacks - the most ever.

Eliminating the Taliban threat will involve a battle of wills. If the US or Nato falters at this juncture, it would be a signal for the Afghan population that the Taliban is winning and that Western forces want to opt out.

In the end, though, it is Pakistan that must commit to eliminating Afghan Taliban leaders who continue living in Pakistan. Destroying their facilities in Pakistan, enforcing a cease-fire during the elections and pressuring them into talks with the Kabul government are just some of the steps that Islamabad can take.

For the army and President Asif Ali Zardari's government, international support is crucial. So is greater maturity by India, which must revive stalled peace talks with Pakistan on the disputed territory of Kashmir. Reducing the threat along the Indo-Pakistan border would allow Pakistani troops to focus more fully on the Taliban.

The Pakistani public, army and government have realised the Taliban threat. That is a crucial first step. But it needs strong international support to effectively respond.

Rashid, a Pakistani journalist and a fellow at the Pacific Council on International Policy, is the author of Descent Into Chaos: The United States and the Disaster in Pakistan, Afghanistan, and Central Asia.