There was a young lady of Niger
Who smiled as she rode on a tiger;
They returned from the ride
With the lady inside,
And the smile on the face of the tiger.
It's clear that some powerful forces in Pakistan have for thirty years supported Islamic radicals in Afghanistan. Primarily, they've backed the Taliban, but they've at least tolerated and at most cooperated with al-Qaeda as well. Pakistan is not dominated by jihadists, and they didn't get involved in Afghanistan for religious or ideological reasons. They supported the Taliban for political reasons: first to cause trouble for the Soviet Union when it controlled Afghanistan, then to train Islamic guerrillas who would tie down Pakistan's traditional adversary, India, in the territory of Kashmir, which India and Pakistan both claim.
It's not clear to me whether Pakistani policy was made by the government, the military, or the ISI, Pakistan's equivalent of the CIA. Without being sure, it is hard to tell whether Pakistan's current military campaign against Taliban forces inside its borders is for real. If it is real, it makes me wonder if whoever calls the shots in Islamabad has realized that the smile is on the face of the tiger. They thought they were using the Taliban, but the Taliban was using them even more.
The fighting is going on 60 miles from the capital city--as close to Islamabad as Worcester is to Boston. The Taliban is that close to taking control of a country that possesses nuclear weapons. God help us all if they do.
If they don't, if we are spared that, our country should learn from the experience. The U.S. actually encouraged Pakistan to support these people against the Soviets, sending money through Pakistan to the warlords who run Afghanistan now and the jihadists who want to run it, both. Our meddling has come back to haunt us. We should make covert wars a thing of the past. They have always hurt us in the long run.