The Pakistani army has exceeded expectations in its offensive against Taliban fighters in northwestern Pakistan, effectively marshaling arms, tactics and political support. But the tougher challenge will be preventing the extremists from returning, or from regrouping elsewhere.
"The key question is whether the army can hold the ground afterward," said Urmila Venugopalan, a South Asia expert with the defense analysis group Jane's.
The early results, which come at a huge humanitarian cost, have bolstered at least temporarily the reputation of a military sometimes accused of fostering militancy to further its long-standing fight with India over the disputed region of Kashmir.
Analysts, however, pointed out that early military victories are only a first, easy step in an effective counterinsurgency campaign. The government must also address the sources of discontent on which the extremists thrive, including government corruption, inadequate services and a sclerotic legal system.
"It's never a solution to the problem," said Shaukat Qadir, a retired Pakistani brigadier general. "People have complaints, which need to be addressed sooner or later."
Some also believe the army remains halfhearted about fighting militancy and continues to see India as the "real" enemy.
"I'm still not sure if this was all done to please the Americans," said Shireen Mazari, a defense analyst. "People who die don't have Taliban printed on their foreheads. It could mostly be civilians."
The army has deployed more than 20,000 troops against an estimated 4,000 to 5,000 Taliban fighters. A rule of thumb holds that armies need a 10-to-1 advantage in fighting insurgencies, said Farrukh Saleem, executive director of Islamabad's Center for Research and Security Studies.
Military experts sometimes refer to the type of fighting going on in the Swat, Buner and Dir districts as "asymmetric warfare." Put simply, most armies aren't great against scrappy, highly motivated, mobile militants.
Since the offensive was launched in late April, Taliban fighters have avoided head-on conflict with a superior military force, engaging in hit-and-run, harassment and scare tactics, and, when all else failed, hiding or fleeing, hoping the army would lose interest. That's exactly what happened in Swat in late 2007, late 2008 and early this year.
They've also focused on softer targets, such as police stations and government offices, in a bid to create fear among the civilian population.
What's potentially different this time around, analysts said, is the greater public support for the army, provided it holds. That could be tested as more retaliatory suicide attacks hit Pakistani cities, such as the recent strikes on a security headquarters in Lahore and a five-star hotel in Peshawar.
Although most Pakistanis had gone along with a controversial February deal allowing the Taliban to impose Sharia, or Islamic law, in Swat, the Taliban's expansion into Buner, a mere 60 miles from Islamabad, the capital, set alarm bells clanging at home and abroad.
"I think the army played it very intelligently," said Tasneem Noorani, a former minister. "Everyone begged them to come in. So people can't complain during the next election. It's a popular operation."
Targeting Buner and Dir first also made strategic sense. By attacking two districts that bracket Swat, analysts said, the army forced militants inward, letting the military effectively employ its air power and artillery against a more lightly equipped adversary using rocket launchers, machine guns, explosives, light artillery and small arms.
With the conflict area largely blocked to outsiders, however, many of the details remain unclear.
"The army spokesman stands up there at a press conference every day and tells us how many were killed yesterday," said Kamran Shafi, a retired Pakistani army officer and analyst. "But there are almost no pictures and little transparency."
Initially the military relied heavily on air power, claiming success against Taliban strongholds and ammunition dumps.
"The army couldn't just put boots on the ground and get slaughtered," said Talat Masood, an analyst and retired Pakistani general. "Once they soften them up significantly, and they're on the run, they can make better progress."
With the area ringed, ground troops were sent in to control mountain passes and other choke points, cutting off Taliban supply routes and hampering escape.
"I think that was quite effective," said Rahul Bhonsle, head of Security-risks.com, a New Delhi-based military analysis group.
It also dropped special-forces units from helicopters into Taliban strongholds, analysts said. Armies, with their mechanized transport and heavy artillery, don't tend to do well in densely covered mountainous terrain, said I.A. Rehman, an independent analyst. The special forces helped blunt that disadvantage by calling in bombing targets for aircraft and taking the fight to the militants before they could flee or fully dig in.
Still, experts warn that this may prove a Pyrrhic victory if fighters quietly return in coming months and regroup to fight another day.
Early on, the army concentrated on the northwestern side of Swat, analysts said, blocking escape routes in the direction of the porous Afghan border and driving militants south, where the flatter terrain favored the army and where troops moving in from Buner and Dir could intercept them.
"Basically, the army tried to cut off the routes that give them an exit," said Nasim Zehra, an independent defense analyst.
The government also employed some sleight of hand to prevent Taliban fighters from being resupplied.
In a cable reportedly intercepted by the army that was subsequently leaked, Swat Taliban leader Maulana Qazi Fazlullah pleaded for assistance from Baitullah Mahsud, a top Pakistani Taliban leader based in the South Waziristan region.
But South Waziristan officials distracted Mahsud with a jirga, or council, of tribal elders ostensibly sent to conduct local peace talks, said Rahimullah Yusufzai, an editor with the News newspaper in Peshawar.
"It was a smart strategy," he said. "He never stopped talking."
Despite its early success, the army has come under growing pressure to capture or kill top Taliban leaders, including Fazlullah and close aides Ibne Amin, Shah Dawran, Mehmood Khan and Muslim Khan. At least three attempts have been made to assassinate Fazlullah, and two captured Taliban aides were recently slain in an ambush en route to an interrogation -- perhaps to prevent their giving intelligence to the military.
Analysts say the military gains of recent weeks are a good start but that the next few months will determine whether Pakistan has the will, deft touch and mix of military and political policies needed to reverse years of insurgent gains.
"This has been a huge operation. Now we'll have to see whether the government can mount an effective counterinsurgency strategy," Zehra said. "They've done military before and they've done the economic side before. The question is whether it can be well planned together."