As I noted last week, Pervez Musharraf resigned as president of Pakistan today, ending the potentially divisive effort to impeach him.  The Yousef Gilani government won’t pursue prosecution, allowing Musharraf to retire quietly and the army to accept the expulsion of its former commander.  The Pakistani parliament now has to decide how to undo Musharraf’s greatest mistake:

Musharraf’s resignation Monday signaled the end of a long and important relationship with the U.S. Musharraf was one of the first Muslim leaders to declare allegiance to the U.S. after the Sept. 11, 2001 attacks. With his support the U.S. was allowed to use several military bases in Pakistan while Pakistani army troops were deployed to pursue Taliban and al-Qaeda insurgents sheltering in the country’s rugged tribal areas near the border of Afghanistan. It was a tremendously risky stance for the leader of one of the world’s most populous and politically divided Muslim nations — one that provoked ire from al-Qaeda leaders in particular. But the alliance earned Pakistan important political dividends and more than $10 billion in U.S. aid, transforming the impoverished country from a political pariah to a regional economic powerhouse.

Signs that the strength of Musharraf’s alliance with the U.S. was on the wane emerged this spring, however. U.S. officials expressed increasing frustration with Pakistan’s faltering efforts to blunt the threat from Taliban and al-Qaeda insurgents inside Pakistan. As progress stalled on the U.S.-led war in Afghanistan, now in its seventh year, U.S. officials became more vocal about their suspicions that intelligence agencies under Musharraf’s regime had been complicit in supporting a resurgent Taliban. Last month, top CIA officials confronted the Pakistani government with evidence that Pakistani intelligence agents had assisted in a suicide bombing attack on the Indian Embassy in Kabul. …

Musharraf, who seized power in a military coup in 1999, stepped down after reaching an agreement with the coalition government that granted him indemnity from prosecution and provided for his safe passage out of Pakistan, according to government officials with knowledge of the talks. The officials were not authorized to speak publicly about the terms of the resignation because they have not yet been made public. The agreement was reached after marathon negotiations between the president’s aides and top members of the coalition government.

The most pressing issue for the parliament isn’t the war on terror but the reversal of Musharraf’s war on the judiciary.  His abrupt dismissal of judges last year and his appointment of his cronies to the bench precipitated the crisis of his presidency, and remains the most animating feature of parliamentary politics.  Nawaz Sharif wants Musharraf’s appointments invalidated and the dismissed jurists reinstated.  Gilani’s party wants a more moderate approach of reinstating the dismissed without firing the Musharraf appointments outright.

On the war, though, Musharraf’s departure probably won’t have much effect, because the parliament’s initial approach has already failed.  Gilani has adopted the Musharraf approach after watching his appeasement attempts backfire:

The outgoing Pakistani president — who abandoned Pakistan’s support of the Taliban regime in Afghanistan and sided with Washington after the Sept. 11 attacks — has been largely sidelined since February elections brought his foes to power.

But the new civilian government has done surprisingly little to change his policies in the militant-infested northwest regions bordering Afghanistan and wants to retain close ties with the U.S., supporting the international fight against Islamic extremism. …

The coalition government’s efforts to strike peace deals with militants are in tatters, and — like Musharraf — it is back to relying on the military to try to root out the extremists.

“I think they don’t have any option,” Rasul Bakhsh Rais, a politics professor at Lahore’s University of Management Sciences. “The terrorists are not going to surrender. They have long-term objectives in the region.”

In fact, the departure of Musharraf could have a salutary effect on the war.  The civilian government has been distracted since its inception in February with the question of Musharraf, keeping the army on edge and generally undermining any hope for a coordinated effort against extremists and terrorists.  Now that the Gilani government has reached its accommodation with the army regarding Musharraf, the two sides can form a more effective partnership in addressing the issues in the FATA with the Taliban and al-Qaeda.

Another specter looms on the horizon, however.  The government in Islamabad has to start any effort against the terrorists by cleaning house in the ISI.  Pakistan’s intelligence service has been thoroughly corrupted by Islamist extremists and has assisted in their terrorist attacks, including the bombing of the Indian embassy in Kabul.  The parliament and the army have to address this cancer within their government before they can effectively fight the extremists in the border territories, and that could prove fatal if the ISI goes completely rogue.