ISLAMABAD, Pakistan - Nawaz Sharif, a wealthy businessman who twice served as Pakistan's prime minister in the 1990s and brought the country into the world's nuclear club, appeared Saturday night to be headed to an unprecedented third term in the post.

He declared victory to supporters in Lahore, where his Pakistan Muslim League-N has long dominated politics, after partial and unofficial results in a landmark national election showed his center-right party had locked in enough seats in the National Assembly to lead a coalition government.

"Results are still coming, but there is a confirmation that PML-N will emerge as the largest party," Sharif said. "We should thank Allah that he has given PML-N another chance to serve you and Pakistan."

Sharif, 63, who was toppled in a coup in 1999, had been widely favored to emerge as premier, but no party appeared to have won enough votes to claim a simple majority of the 172 directly elected National Assembly seats. Analysts projected that PML-N would win at least 100.

Brokering a coalition government could take weeks. In his speech, Sharif also voiced confidence that results would show by Sunday that he would have enough seats to claim the required majority. But if that doesn't happen, he will have to turn to smaller independent parties - or seek the support of his strongest rivals, the cricketer-turned-politician Imran Khan and the Pakistan People's Party (PPP), which just ended a five-year term.

Khan's third-party Movement for Justice and the PPP appeared in early results likely to win the same number of seats, about 35.

"If the numbers shaping up come true, this is a stunning victory for PML-N," Cyril Almeida, a columnist for the Dawn newspaper, said on Twitter.

Khan's campaign manager, Asad Umar, said the PML-N had triumphed. "They have emerged as the largest party," Umar told Geo TV, Pakistan's largest cable news channel. "I want to congratulate the party."

Millions of exuberant Pakistanis, many voting for the first time, turned out in higher-than-expected numbers Saturday in defiance of insurgent violence aimed at sabotaging the balloting that will bring a historic transfer of power between elected governments.

Scattered gun and bomb attacks marred an otherwise celebratory day in a nation mired in economic crisis and locked in a fight with a virulent native Taliban insurgency. By the time polls closed, at least 20 people had died in attacks, the most serious targeting a pro-U.S. political party in the southern port city of Karachi.

The election commission projected that more than 60 percent of the nation's 86 million voters cast ballots for national and provincial assemblies - a number that, if confirmed, would represent the highest turnout since 1970, when the populist PPP swept to power.

A religious conservative sometimes criticized as soft on militancy, Sharif is also a realist. His advisers say he is likely to seek friendly ties with Washington, which for decades has been Pakistan's principal financial patron. He has talked of extracting Pakistan from the U.S. war against extremists, including those being sheltered on Pakistani soil, but provided no plan for doing so.

His campaign touted his experience as a businessman, asserting that he could tackle systemic economic problems, notably an energy crisis that has crippled industries.

Sharif cited the nation's nuclear tests in 1998 as an example of his strong leadership. Pakistan needed nuclear weapons, he said, to counter India's and to pressure that nation into detente with Pakistan, its historical enemy.