Pakistan's nationwide elections, held amid turmoil and intended to pass power from one elected civilian government to another, were a tribute to the country’s leaders and people.
The apparent victor in last weekend’s vote was Nawaz Sharif. If he becomes prime minister, given the number of seats his Muslim League party won, it will be his third time in power. His last term was cut short in 1999 when Pakistan’s military overthrew him.
A former steel magnate, Mr. Sharif, 63, depends on his wealth and tribal affiliations to pick up votes. He was challenged by Imran Khan, a cricket star, whose campaign promises included distancing Pakistan from the United States.
Pakistan lets the United States use killer drones over its territory without much oversight. The Pentagon seeks to withdraw thousands of tons of military equipment from Afghanistan via Pakistan. Mr. Sharif is not expected to challenge these plans, whereas Mr. Khan might have.
Mr. Sharif’s first task will be to stitch together a governing coalition. Then he will have to tackle such problems as a separatist movement in Baluchistan, general lawlessness along the Afghanistan border, and the need to find a working arrangement with the Taliban, who are active in Pakistan as well as Afghanistan.
Violence by the Taliban and others killed more than 100 people during the election campaign. Voters’ discontent with Pakistan’s shaky economy and widespread corruption returned Mr. Sharif to power in place of the government led by incumbent Asif Ali Zardari, the widower of assassinated former prime minister Benazir Bhutto.
Mr. Sharif deserves congratulations on his victory, despite the big problems he inherits. The successful elections represent a mid-grade triumph of democracy.