ISLAMABAD — Former Pakistani Prime Minister Nawaz Sharif declared victory after a historic parliamentary election marred by violence Saturday, a remarkable comeback for a leader once toppled in a military coup and sent into exile.
The 63-year-old Sharif, who has twice served as prime minister, touted his success after unofficial, partial vote counts showed his Pakistan Muslim League-N party with an overwhelming lead. The party weathered a strong campaign by former cricket star Imran Khan that energized Pakistan’s young people.
Sharif expressed a desire to work with all parties to solve the country’s problems in a victory speech given to his supporters in the eastern city of Lahore as his lead in the national election became apparent based on vote counts announced by Pakistan state TV.
The results, which have to be officially confirmed, indicated Sharif’s party has an overwhelming lead but would fall short of winning a majority of the 272 directly elected national assembly seats. That means he would have to put together a ruling coalition, which could make it more difficult to tackle the country’s many problems.
‘‘I appeal to all to come sit with me at the table so that this nation can get rid of this curse of power cuts, inflation and unemployment,’’ Sharif said.
Pakistanis voted in high numbers Saturday despite widespread Taliban violence, in an election that had historic possibilities for the country’s often troubled democracy.
Threats by Taliban rebels to disrupt the day were borne out in attacks across the country that left at least 20 people dead, including at least 11 in a bombing in Karachi and others in the violence-torn province of Baluchistan, where turnout was low.
Intensifying allegations of vote irregularities in Karachi, the nation’s largest city, led to the invalidation of results from dozens of polling places, Pakistani officials said.
Record turnout was reported in several cities, and poll times were extended. It was a reflection of an energized political campaign season dominated by the battle between the party leaders — Sharif, a who has emphasized economic improvements, and Imran Khan, a sports star who became a political phenomenon on the strength of an anticorruption crusade.
Despite making much of their differences, both men hold basically conservative political visions, and both promised to rein in US influence in Pakistan.
The election was Pakistan’s 10th since 1970 but the first in which a civilian government that has served a full five-year term is poised to hand power peacefully to another elected government.
Unlike previous elections, in which the military’s Inter-Services Intelligence Directorate was widely accused of vote manipulation and intimidation, this one offered little evidence of involvement by the military, which has ruled Pakistan directly for more than half its 66-year history.
Instead, the country was gripped by election fever in recent weeks, most of it driven by the contest between Sharif and Khan.
Although Sharif’s Pakistan Muslim League-N party was favored to win the most seats in Parliament, it was unable to gain a majority becaues of an aggressive challenge from Khan in Punjab Province.
Khan electrified the campaign in recent weeks with a series of mass rallies that tapped into a deep vein of support among young and middle-class Pakistanis in urban areas.
Public sympathy for the former cricket star rose after he fell nearly 15 feet to the ground at a rally Tuesday, injuring his back.
The results will also have implications for the United States, which has been enjoying a relatively peaceful stretch in its often stormy relationship with Pakistan in recent years.
Sharif, a conservative and oil baron, came to US attention during Pakistan’s tense confrontation with India in 1999, when the possibility of a nuclear conflict was averted after mediation by President Bill Clinton.
Sharif hinted oduring the campaign that he would seek to redraw Pakistan’s relationship with the United States and negotiate with Taliban rebels, although he offered few specifics.
Khan’s ideas were more defined: He vowed to end CIA drone strikes in Pakistan’s tribal belt by ordering the Pakistani military to shoot down US aircraft if necessary, and he said he believed the state should negotiate with Taliban insurgents, not fight them.
The election evoked a rare sense of enthusiasm for politics in Pakistan. About 4,670 candidates fought for 272 directly elected seats in Parliament, while almost 11,000 people battled for the four provincial assemblies.
Material from The New York Times was used in this report.