As Pakistan has been gripped by political turmoil, another serious crisis has been unfolding in the northwest part of the country. Pro-Taliban extremists have been aggressively making inroads from the tribal areas along the Afghanistan border to towns and villages farther inside Pakistan.
The army says it has the militants on the run, but there are doubts about whether the Pakistan armed forces can keep them at bay.
When Pakistan's President Pervez Musharraf imposed a state of emergency last month, he said it was because he needed to battle pro-Taliban forces that were creating mini-states in the tribal regions that border Afghanistan. Instead, Musharraf focused his efforts, and the country's security forces, on battling his political opponents.
Meanwhile, insurgents began pushing east into Pakistan, capturing towns and villages in the Swat Valley - a favorite tourist destination, less than 100 miles from the capital, Islamabad. Ser Fraz Khan, a professor of regional studies at Peshawar University, was stunned when he recently returned to his home village.
"I saw on the road around 400 militants carrying guns, every 10 yards, they were wearing black turbans," he said. "Their fingers were on the trigger, guns, Kalashnikovs or heavier... and I was scared, too scared.
Khan said at least 3,000 militants were around the town. As in several other places in the area, they had overrun the police station, and government offices. Black flags — a Taliban symbol — were flying from the buildings. They also began imposing a harsh form of Islamic law known as sharia. Video and CD shops were shut down, as were barber shops, and girls' schools, Khan said.
"If you did not have a beard, you were an infidel and if a woman (without) a burqa ... she was an infidel, and ... they could just grab you, and kill you," he said.
The changes are ominous, as they mirror those imposed by the Taliban in neighboring Afghanistan when the hard-line Islamist movement seized power there in 1996. Khan says he took his immediate and extended family to another home in nearby Peshawar.
The crowded and dirty city of Peshawar has long been a transit point for traders, conquerors, weapons, and consumer goods. The city has also long been a gateway to Pakistan's North West Frontier Provinces, which hug the Afghan border. Ismail Khan, editor of the independent newspaper Dawn, in Peshawar, said that lately, most of the talk in the city has been about the insurgency just to the north.
"All the security agencies actually knew about the presence of militants in Swat," Khan said. "What bothers me is, why did the government, knowing there was a situation developing in Swat, allow it to get out of hand?"
Initially the security was handled by the Frontier Corp, a paramilitary group. But in July, about 2,000 Pakistani army troops were sent. They did little, however, with some even surrendering to the insurgents without firing a shot.
Khan said the insurgency is spreading both east and farther south along the border. He said militants were attempting to control two strategic highways, including one linking China to Pakistan.
"They were actually threatening the Karakoram Highway, and that's why I believe the government thought enough is enough," Khan said.
About two weeks ago, the army launched a major offensive, bringing in tanks, helicopters, and 15,000 troops. It was able to push back militants in many - but not all - of the towns in the Swat Valley, according to retired Brigadier Mahmood Shah, who keeps in close touch with military commanders. He said the army has driven many of the insurgents back to their stronghold on a remote mountaintop. Shah said now the military has to regroup.
"They need to have a reappraisal of the whole situation... Then they should work out an overall strategy and they should reapply troops," Shah said.
But Pakistan's army is not used to fighting an insurgency. For decades, its main adversary has been neighboring India. The new army chief of staff, Gen. Ashfaq Kiyani, will have to turn the military around to do counterinsurgency warfare, said Talat Masood, a defense analyst.
"So he will have to do a lot of reorganization, better ... equipment for this sort of thing, change the mindset of the military in many ways to fight this new threat," he said.
Masood said that stopping the insurgents will take years, and more than military action. He said defeating the insurgency will require a comprehensive approach — bringing development, economic opportunity and security to the tribal areas, which have ruled themselves for decades.