Lahore (CNN) -- Polls closed in Pakistan Saturday, after a day of voting in which bursts of deadly violence aimed at polling stations failed to deter Pakistanis keen to have their say in landmark national and provincial elections.
Voter turnout was nearly 60%, the chief election commissioner said early Sunday.
The national election marks the first transition between civilian governments in the nation's 66-year history.
In its short existence, the nation has experienced three military coups, been ruled by generals for half its life and remains mired in political turmoil.
In March, the democratically elected government finished serving a full five-year term, paving the way for the elections.
Street parties erupted in the cities of Lahore and Peshawar early Sunday, with people celebrating even before the results of the vote were in.
In his stronghold of Lahore, candidate and former Prime Minister Nawaz Sharif said he was confident his party will form the next government. He said he hopes his party won enough seats to form a government on its own but that he is willing to work with others to solve the country's problems.
The Election Commission extended polling hours in some constituencies in the southern city of Karachi, where there were complaints about the vote.
The Election Commission secretary, Ishtiak Ahmed Khan, told a news conference the election was free and fair across much of the country, despite the problems in Karachi.
Aside from claims of irregularities, four blasts hit Karachi as people voted, killing 14 people and wounding dozens. Across the country, 29 people were killed in election day violence.
Despite pre-election attacks, voters lined up at dawn at polling stations nationwide, eager to send off the caretaker government put in place in March.
"This is the first time I am voting and I am 60; I want change," said Shaheen Khan, who was at a polling station in Karachi, the nation's largest city. "There were thousands of people when I came ... the queue was so long. People in wheelchairs and crutches all waiting to vote."
Waits of three hours or more were reported at some polling stations. Election officials also reported delays in opening at some polls, the official Associated Press of Pakistan news agency reported.
A statement from the office of interim Prime Minister Mir Hazar Khan Khoso thanked the people of Pakistan for "coming out in huge numbers" to vote, as well as everyone involved in participating in and organizing the elections.
He voiced "confidence that the next phase of counting of votes will also be completed smoothly," and reiterated the determination of the caretaker government to hand over to the winners without delay.
Vote rigging claims
The leader of the governing Pakistan People's Party, Taj Haider, alleged vote rigging in some constituencies in Sindh province and its capital, Karachi, in a news conference broadcast by CNN affiliate Geo TV. Haider called on the country's election commission to hold a new vote in the affected constituencies.
Leaders of the Sindh-based Mutahida Qaumi Movement (MQM), one of Pakistan's largest and most liberal parties, told reporters that they would boycott the elections over allegations of rigging.
The Sunni Ittehad Council and Jamaat e Islami parties also announced a boycott, Geo TV reported.
Many Pakistanis hope the polls will usher in reform in a country battling issues including corruption, a struggling economy and security threats.
President Asif Ali Zardari condemned the Saturday's election violence but said the militants' "cowardly acts" would not stop people from exercising their right to vote.
An open letter from Malala Yousafzai, the Pakistani schoolgirl who was attacked by the Taliban last year for her efforts to promote girls' education, urged everyone, and particularly women, to use their vote.
"If we want education, electricity and natural gas in our country, we must take a step," said her letter, published by Pakistan's Dawn website. "Let's vote for our country. We never realized how much powerful our vote is. One vote can change our country."
Blasts target voters
In some cities, the insecurity was evident Saturday.
Two of the blasts in Karachi targeted the Awami National Party office, killing 11 and wounding 36, said Naeem Shah, a spokesman for Karachi police.
A third explosion was in the Karachi suburb of Landhi. It killed three people and wounded nine, according to the deputy commissioner of Malir district, Qazi Jan Mohammed. Voting continued afterward, he said.
A fourth explosion, which wounded four people, was in the Peerabad area of Karachi, Shah said.
Fakhruddin Ebrahim, the chief election commissioner for Pakistan, said he contacted the military over security concerns in Karachi and the harassment of polling station staff in the city. He said polling material was stolen in several areas.
Eleven people were killed in two separate bombings in Pakistan's volatile Balochistan province, district police officer Allauddin Kasi said. One of the attacks was on a vehicle carrying voters who had cast their ballots, he said.
Another targeted independent candidate Khadim Shah, the prime minister's office said in a statement condemning the bombing.
Elsewhere in Balochistan, at least four people were killed and eight injured in a clash between two groups at a polling station, police official Sardar Muhammad said.
In another incident, 12 Awami National Party supporters were hurt by hand grenade thrown at a party electoral office in Quetta, said Syed Mobeen Ahmed, a deputy inspector general of police.
Brig. Muhammad Abdur Raheem, the military spokesman for Balochistan, said polling still went well in the province apart from interruptions caused by a few incidents. There was a good turnout, including by women voters, he said.
In the northwestern city of Peshawar, 12 people, children among them, were wounded when a bomb exploded at a polling station in a school, said Habibullah Arif, a local deputy commissioner.
Of the 86 million voters registered to cast ballots, there were 36 million new voters, according to the Election Commission of Pakistan.
More than twice as many candidates are women than was the case five years ago, with 161 running compared with the 64 who contested the 2008 poll, according to the United Nations
As the nation makes the transition after years of mostly military rulers, the economic, political and security situation remains unstable.
As well as high inflation and poverty rates, Pakistan has seen outbreaks of violence, in some cases by Islamic extremists.
Since April, the Taliban in Pakistan have killed dozens in attacks on the three main political parties. Many urban voters and parties regard resurgent fundamentalism as one of country's biggest threats.
More than 600,000 security personnel were deployed nationwide leading up to the election, Information Minister Arif Nizami said Friday.
Pakistan's army, which helped deliver 650 tons of ballots to polling stations, deployed 91,000 troops around the country, a military spokesman said.
The ruling Pakistan People's Party is led by Bilawal Bhutto Zardari, the son of assassinated former prime minister and party leader Benazir Bhutto.
While his party became the first civilian government to complete a full five-year term -- the three governments after the death in 1988 of military strongman Zia ul-Haq were all brought down by the army -- its legacy is a deeply fractured country with a faltering economy.
The party's main opposition came from Nawaz Sharif's Pakistan Muslim League-N. One of the country's leading industrialists and richest men, Sharif has been prime minister twice before and was overthrown in a coup when Gen. Pervez Musharraf seized power in 1999.
Viewed as a religious conservative, his party -- Pakistan's second largest -- believes it would have won elections in 2008 had the assassination of Bhutto not given a massive boost to the ruling party.
Another contender was Imran Khan, the former cricket star and heartthrob who leads the Tehreek-e-Insaf (Movement for Justice) party.
Not in contention is Musharraf, who returned in March from four years of self-imposed exile to take part in the elections. A court banned him from taking part in politics and his party, the All Pakistan Muslim League, announced a boycott.
Musharraf and his allies weren't the only ones upset with Pakistan's leadership ahead of the election. The New York Times "strongly protested" the expulsion of its Islamabad bureau chief -- an order that Declan Walsh received at 12:30 a.m. locally, at his home.
The Committee to Protect Journalists joined the Times in slamming the move, with its Asia program coordinator Bob Dietz saying "it shows just how much the authorities fear independent media coverage."
CNN's Saima Mohsin reported from Lahore and Aliza Kassim from Atlanta, and Laura Smith-Spark wrote in London. CNN's Nasir Habib, Shaan Khan, Saska Vandoorne and Greg Botelho, and journalist Imran Javaid contributed to this report.