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. Sharif declared victory following a historic election marred by violence Saturday, as unofficial, partial vote counts showed his party with an overwhelming lead. Supporters of Pakistan Muslim League-N party celebrate the primary unofficial results of the country's parliamentary elections at a party office in Lahore, Pakistan, Saturday, May 11, 2013. The Pakistan Muslim League-N party, led by two-time Prime Minister Nawaz Sharif, has long been considered the front-runner in the race. The party appeared to be moving toward a significant victory Saturday based on partial vote counts announced by Pakistan state TV. Former Prime Minister and leader of the Pakistan Muslim League-N party Nawaz Sharif, fourth from left, waves to his supporters at a party office in Lahore, Pakistan, Saturday, May 11, 2013. Supporters of Pakistan Muslim League-N party celebrate the primary unofficial results of the country's parliamentary elections in Lahore, Pakistan, Saturday, May 11, 2013. Former Prime Minister and leader of the Pakistan Muslim League-N party Nawaz Sharif, center, addresses his supporters as his brother Shahbaz Sharif, right, and daughter Maryam Nawaz, second from left, listen at a party office in Lahore, Pakistan, Saturday, May 11, 2013. Sharif declared victory following an election marred by violence Saturday. Unofficial, partial vote counts show Sharif's party with an overwhelming lead. ISLAMABAD (AP) - Former Pakistani Prime Minister Nawaz Sharif declared victory following a historic 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 premier, 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 need 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. Despite attacks against candidates, party workers and voters that killed 29 people Saturday, Pakistanis turned out in large numbers to elect the national and provincial assemblies. The high participation was a sign of Pakistanis' desire for change after years of hardship under the outgoing government, and it offered a sharp rebuke to Taliban militants and others who have tried to derail the election with attacks that have killed more than 150 people in recent weeks. "Our country is in big trouble," said Mohammad Ali, a shopkeeper who voted in Lahore. Our people are jobless. Our business is badly affected. We are dying every day. The vote marked the first time a civilian government has completed its full five-year term and transferred power in democratic elections in a country that has experienced three coups and constant political instability since it was established in 1947. The election was being watched closely by the United States, which relies on the nuclear-armed country of 180 million people for help fighting Islamic militants and negotiating an end to the war in neighboring Afghanistan. Passion and energy were seen throughout Pakistan, as millions of people headed to the polls, waving flags and chanting slogans in support of their party. Some were young, first-time voters and others elderly Pakistanis who leaned on canes or friends for support as they dropped their vote in the ballot box. One man, Bilal Masih, even came to a polling station in the central city of Multan dressed in his wedding attire, saying his bride could wait until he voted. He decorated his wedding car with flowers and a stuffed tiger, the symbol of the Pakistan Muslim League-N party he supports. "I thought that this was my national duty," said Masih, who was wearing a white and red turban and had garlands of flowers around his neck. The Pakistani Taliban, which has been waging a bloody insurgency against the government for years, tried to disrupt the election because the militants believe the country's democracy runs counter to Islam. The government responded by deploying an estimated 600,000 security personnel across the country to protect polling sites and voters. Many Pakistanis seemed determined to cast their ballots despite a series of gun and bomb attacks. But what should we do?" said Ali Khan, who was waiting to vote in the northwestern city of Peshawar, where one of the blasts took place. Many of the attacks in the run-up to the vote targeted secular parties. That raised concern the violence could benefit hard-line Islamists and others who take a softer line toward the militants, like Sharif and Khan, because they were able to campaign more freely. The chief of Pakistan's election commission, Fakhruddin Ebrahim, said turnout was near 60 percent of registered voters, the highest since the 1970 election. Many Pakistanis expressed pride that so many of their fellow citizens chose to vote. "More political activity means more awareness," said Nasira Jibran in Lahore. More awareness means more accountability. The apparent victor, Sharif, is best known for testing Pakistan's first nuclear weapon in 1998. He is the son of a wealthy industrialist, and his party is seen to have a pro-business stance. Sharif was toppled in a military coup by then-army chief Gen. Pervez Musharraf in 1999 and spent years in exile in Saudi Arabia before returning to the country in 2007. His party came in second in the 2008 elections to the Pakistan People's Party and is seen as more religiously conservative. Sharif faced a strong challenge from Khan's Pakistan Tehreek-e-Insaf party. The winner of the 1992 cricket World Cup tapped into the frustrations of many Pakistani youths fed up with the country's traditional politicians. It's now our turn. We youngsters want our say in national affairs," said voter Rubina Riaz in Lahore. Khan couldn't vote Saturday because he was in the hospital following a horrific accident this week at a campaign event in Lahore in which he fell off a forklift and broke three vertebrae and a rib. Sharif countered the challenge from Khan by pointing out how much more experience in government he has and touting key projects he completed while in office, including a highway between the capital Islamabad and his hometown of Lahore. "It's all about delivering," said Nayyar Naseem, a voter in Lahore. Nawaz Sharif has delivered. He is experienced. Sharif also relied on old-style Pakistani politics, which focuses on doling out political patronage, such as government jobs, to win the loyalty of voters. The battleground between Sharif and Khan was in Pakistan's most populous province, Punjab, where both parties appealed to urban middle class voters. The province contains nearly half of the 272 directly-elected seats in the national assembly. The outgoing Pakistan People's Party was expected to fare poorly in the election because of unhappiness with its performance leading the last government. The vote in the southern city of Karachi was not only marred by violence Saturday, but also threats to election commission staff. The commission said it would re-do the vote at 40 polling stations in one constituency in the city. Sharif inherits a country struggling on a number of fronts. Pakistanis suffer from rolling blackouts that can be as long as 18 hours a day as well as a stuttering economy. The government's shaky financial situation means it will likely have to seek another unpopular bailout from the International Monetary Fund. The country is also battling Taliban militants who want to overthrow the government, while on the western border there are fears that a U.S. military departure from Afghanistan will send violence spilling over into Pakistan. Sharif has favored negotiations with militants in the country's tribal areas. That could put him at odds with the country's powerful military, potentially exacerbating a relationship that is already prickly because of the coup carried out against the former prime minister. In what appeared to be a show of support for democracy in Pakistan, the country's most powerful military officer, Gen. Ashfaq Parvez Kayani, went to the voting booth himself instead of mailing in his ballot. His gesture was broadcast live on local TV. Associated Press writers Munir Ahmed and Zarar Khan in Islamabad, Atif Raza in Karachi, Riaz Khan in Peshawar, Rasool Dawar in Mir Ali, Anwarullah Khan in Khar, Abdul Sattar in Quetta, Matiullah Achakzai in Chaman, and Asif Shahzad in Lahore contributed to this report.