A week after a general election rocked by suspicions of fraud, the dust is beginning to settle. It looks all but certain that Imran Khan, a former captain of Pakistan's cricket team, will be sworn in as the next prime minister. His party, Pakistan Tehreek-e-Insaf (PTI), will dominate the legislature.
The outgoing Pakistan Muslim League-Nawaz (PML-N) and the Pakistan Peoples Party cried foul, noting that the army had come out strongly in Khan's favor, muzzling the media and sending security agents to polling stations.
But the fact that these two ancient rivals are now making common cause as the loyal opposition suggests that they accept the result. So for the second time in Pakistani history, power has been democratically transferred.
For more than two decades, Khan has railed against a sleazy system of hereditary politicians and patronage networks. Yet this is the first time the PTI has shown a broadly national appeal in a country of 207 million. Its 4 million more votes than the PML-N represent a notable popular victory, one only partly undermined by vote-rigging allegations. Most remarkable is the PTI's win in Karachi, a city of powerful local machines and thuggish street politics. The PTI may yet wrest Punjab, the country's breadbasket and most populous province, from the PML-N.
That would cap a remarkable fall for the Sharif brothers: Nawaz, the "Lion of Punjab," who was prime minister until last year and is now in jail facing corruption charges, and Shahbaz, Punjab's former chief minister.
Khan, who now commands about 115 seats in the National Assembly, still needs a handful of allies — independents and smaller parties — in order to govern. The PTI's chief bankroller, Jahangir Tareen, has been flattering independents by flying them to Islamabad, the capital, on his private jet. The promises to them are the kind of thing Khan used to decry.
His wooing of the Muttahida Qaumi Movement, or MQM, the most unsavory of Karachi's parties, is making some PTI leaders gag. But at least it means that Khan does not need radical Islamist parties to form a governing coalition. Before the election, he pandered to zealots.
Meanwhile, there is no time to lose for the economy. Not for the first time, an incoming government faces a balance-of-payments crisis. The current-account deficit has widened and the currency is sliding. Pakistan imports three-quarters of all its energy needs.