Were it not for the civilian deaths and the estimated nearly two million refugees fleeing the picturesque Swat Valley, there would be no little irony in Pakistan's army taking on its homegrown Taliban militants.

The same might even be said for U.S. Secretary of State Hillary Clinton's recently expressed concern about Pakistan's atomic arsenal falling into Taliban hands.

After all, as anyone who saw the 2007 film Charlie Wilson's War would know, the U.S. Congress and the CIA combined to send hundreds of millions of dollars in weapons and strategic support to the mujahedeen rebels fighting the Soviet occupation in neighbouring Afghanistan in the 1980s.

swat-soldier-cp-6705246

A Pakistan soldier stands guard in the Jallozai camp south of the Swat Valley in Peshawar in May 2009. The displacement of nearly two million Pakistanis because of fighting with the Taliban is causing aid and political problems for the Pakistan government. (K.P. Butt/Associated Press)

With matching funds from Saudi Arabia as part of the deal, this money increased the influence of the fundamentalist Wahabi school of Islam on both sides of the Afghan-Pakistani border.

It also provoked an inflow of Islamic radicals from around the Muslim world to fight a religious war that — for a great many of them — did not end when the Soviets withdrew in February 1989.

For Pakistan's military government, these militants were initially something of a godsend in the troubled Indian subcontinent, the arena for three wars between Pakistan and its much larger and equally nuclear-tipped neighbour to the east, India.

These Islamists could be "controlled" by military intelligence and re-deployed in the proxy war over the disputed state of Kashmir and other low-level confrontations with India, just to keep the pot on the boil. That list might even include the three-day attack on Mumbai in November, as India claims and Pakistan denies.

 Daniel Lak, a regular correspondent for CBCNews.ca, covered the Indian subcontinent for the BBC for nearly 20 years, many of them as the South Asia correspondent based in New Delhi. A Canadian writer and documentary filmmaker, he is the author of India Express: The Future of a New Superpower

But now, as these militants have grown bolder and more violent within Pakistan itself — suicide bombings are almost a weekly occurrence here these days and the Swat-based Taliban was seen to be ignoring a ceasefire and edging towards the capital, Islamabad, just over 100 kilometres away — the Pakistan army has responded with surprising force.

According to the army, at least 1,000 Taliban fighters have been killed since the crackdown began on May 2, while the exodus of civilian refugees — 1.4 million this month alone — is the largest since independence in 1947.

Does this mean Pakistan authorities are finally starting to take the threat of armed Islamic extremism seriously? As usual in a country as consistently troubled as Pakistan, the answers are always a bit murky.

Not so fast

One of those who feels the new civilian government of Asif Zardari lacks the political will to stand up to either the radicals or the army, who may still want to control the militants, is the respected Pakistani journalist Ahmed Rashid, author of Descent Into Chaos, The United States and the Failure of Nation Building in Pakistan, Afghanistan, and Central Asia.

swat-refugees-392-6732462

Refugees from Buner, the valley next door to Swat in Pakistan's North-West Frontier Province, crowd onto trucks and buses to escape the army assault on the Taliban in May 2009. (Emilio Morenatti/Associated Press)

"Pakistan is close to the brink, perhaps not to a meltdown of the government, but to a permanent state of anarchy, as the Islamist revolutionaries led by the Taliban and their many allies take more territory, and state power shrinks," the Lahore-based author wrote recently in the New York Review of Books.

He went on to note that "the Bush administration pandered to the illusion that the Pakistani army had a strategic interest in defeating home-grown extremism, including both the Afghan Taliban and al-Qaeda."

But that "instead of revamping Pakistan's capacity for counterinsurgency, the army bought $8 billion worth of weapons for use against India — funds that are still unaccounted for, either by the U.S. Congress or the Pakistani government."

This appears to be a widespread view these days, particularly in India, which almost scoffs at Pakistan's decision to move an extra brigade, a mere 6,000 or so soldiers, into the troubled North-West Province, where the Taliban has gained a foothold.

Adding his voice, Canadian Defence Minister Peter MacKay has called Pakistan "the most dangerous country in the world."

pakistan-india-kashmir

Pakistan's troubled Swat Valley is just over 100 kilometres from the capital Islamabad. (CBC)

At the same time, there are analysts who note the Pakistan army itself has been bloodied and embarrassed by the Taliban, losing an estimated 1,800 soldiers in these conflicts over the past four years and being turfed unceremoniously out of Swat just two years ago.

It may no longer be willing to turn a blind eye to its own authority.

Islamic affairs analyst Juan Cole of the University of Michigan is one of the few voices urging a little optimism.

"A few thousand tribesmen can't take over a country of 172 million with a large urban middle class that has a highly organized and professional army," he told Reuters recently.

"The Taliban aren't going to take over the Pakistani government."

The test of Swat

The current fighting in Swat, a one-time tourist attraction not far from the capital, could be a real test of the government's resolve against its militants. Alternatively, it can be seen as something of a PR move to justify more foreign military aid.

At the moment, there are approximately 15,000 government soldiers and security forces taking on an estimated 4,000 to 5,000 Taliban, a group that has blown up girls' schools and publicly beheaded opponents and local police to hold sway in the region for the past two years.

Until now, the fighting has been mostly in the small villages and mountain redoubts but the next stage — a house by house clearing of the largest city, Mingora, where hardliners are said to be well entrenched — will be the most telling.

At stake for Pakistan is billions in foreign aid and a possible realignment of its security priorities.

The U.S. alone is promising $7.5 billion in aid over the next five years — if Pakistan really takes on its militants this time. And Pakistan President Zardari has been relentless in pitching his case in Western capitals for more military and other aid.

Islamic militancy, he said in numerous interviews during recent trips to London and Washington, "is the world's problem, not just my problem. We have to fight it together."

He should know. He came to power after his wife, former prime minister Benazir Bhutto, was killed in late 2007, reportedly by Islamic militants from the Afghan border regions.

swat-boys-392-cp-6400083

Pakistani boys study atop the rubble of their school in Mingora, capital of the troubled Swat region in Pakistan, in March 2009. The school had been blown up by Taliban militants. (Sherin Zada/Associated Press)

But of course everything in Pakistan is seen through the prism of its relationship with its historical enemy, India.

Since independence from Britain in 1947, assassinations and military coups have consistently eclipsed democracy in Pakistan, a country with a GDP of less than $2,000 per capita, and many Pakistanis blame their own army for the current state of unrest.

The military, by some accounts, consumes 75 per cent of government revenues, controls a vast network of businesses and commercial ventures, and, in the minds of many Pakistanis, requires an ongoing state of tension with India in order to keep its tight grip on domestic politics and the national budget.

With billions in potential aid on the horizon, that grip will either be strengthened or pried free, depending on who is really in charge of Islamabad's priorities at the end of the day.