Former Prime Minister and leader of the Pakistan Muslim League-N party Nawaz Sharif waves to his supporters at a party office in Lahore, Pakistan, Saturday, May 11, 2013 (Photo: AP)
Toppled in a 1999 coup, jailed and exiled, Nawaz Sharif has made a triumphant election comeback and on Sunday was heading for a third term as Pakistan's prime minister.
In one sense, the polls were a democratic landmark, marking the first time one elected government was to replace another in a country vulnerable to military takeovers.
But Saturday's vote failed to realize the hopes of many that the hold of patronage-based parties would end after years of misrule and corruption in the strategic US ally.
Sharif held off a challenge from former cricket star Imran Khan who had hoped to break decades of dominance by Sharif's Pakistan Muslim League (PML-N) and the Pakistan People's Party (PPP), led by the Bhutto family.
Khan's Tehrik-i-Insaf (PTI) put up a strong fight and he is likely to remain a force in politics in the nuclear-armed South Asian nation.
"Nawaz's victory says two things about Pakistan: one, the people of Pakistan prefer the comfort of status quo over the uncertainty of revolutions; and two, all roads to the center go through Punjab, and in Punjab, people are right-leaning and conservative," said senior journalist Nusrat Javeed.
"Still, for a party that only really arrived on the political scene in a serious way two years ago, PTI's performance was remarkable, to say the least."
Sharif, a wealthy steel magnate from the prosperous and most populous province of Punjab, declared victory in a jubilant speech to supporters late on Saturday even as votes were still being counted.
On Sunday, television channels said results so far showed that the PML-N had captured 88 seats of the 272 National Assembly seats that were contested.
The PTI had secured 34 seats while the PPP, which led the government for the past five years, won 32.
Sharif's party may not have enough seats to rule on its own and may be forced into a coalition, which could make it difficult to enact reforms needed to revive the economy.
To avoid that, the PML-N would need to secure 137 of the 272 National Assembly seats that were at stake. Sharif's party would then be allocated a majority of 70 other parliamentary seats that are reserved for women and non-Muslim minorities.
Sharif, a religious conservative, has said the army, which has ruled the country for more than half of its turbulent 66-year history, should stay out of politics.
But he will have to work with Pakistan's generals, who set foreign and security policy and will manage the country's difficult relationship with the United States as NATO troops withdraw from neighboring Afghanistan in 2014.
Sharif also believes Pakistan should reconsider its support for the US war on Islamist militancy, which has earned the country billions of dollars in aid.
Despite pre-poll violence and attacks on Saturday that killed at least 40 people, millions turned out to vote.
Sharif, who advocates free-market economics, is likely to pursue privatization and deregulation to revive flagging growth. He has said Pakistan should stand on its own two feet but may need to seek a another bailout from the International Monetary Fund to avoid a balance of payments crisis.
Sharif will have to ease widespread discontent over endemic corruption, chronic power cuts and crumbling infrastructure. He has described Pakistan as a "mess".
Cricketing hero Khan in the end did not have the momentum needed to trip up Sharif despite his popularity among urban youths, many of whom were voting for the first time in an election that saw a robust turnout of around 60 percent.
They had rallied behind Khan's calls for an end to graft and a halt to US drone strikes against suspected militants on Pakistani soil, widely seen as a violation of sovereignty.
DEALING WITH THE INSURGENCY
Sharif will likely press for negotiation with the Pakistan Taliban, whose bombing attacks failed to derail the election, but he could run into resistance from the military which has lost thousands of soldiers fighting the insurgency.
Despite Pakistan's history of coups, the army stayed out of politics during the five years of the last government and threw its support behind the election.
However, some fear the military could step back in were there a repeat of the incompetence and corruption that frustrated many Pakistanis during the last government.
Sharif, who was toppled in a 1999 bloodless coup by former army chief Pervez Musharraf, may take steps to improve ties with Pakistan's arch-enemy, India. Efforts to boost trade between the neighbors have stalled due to suspicion on both sides.