Despite a bloody campaign marred by Taliban attacks, Pakistan was holding historic elections Saturday pitting a former cricket star against a two-time prime minister once exiled by the army and an incumbent blamed for power blackouts and inflation.
Polls opened Saturday morning across the nation in what is a closely watched race to determine the fate of this nuclear-armed country crucial to stability in the region.
The vote marks the first time in Pakistan's 65-year history that a civilian government has completed its full term and handed over power in democratic elections. Previous governments have been toppled by military coups or sacked by presidents allied with the powerful army.
Deadly violence struck again Friday, with a pair of bombings against election offices in northwest Pakistan that killed three people and a shooting that killed a candidate in the southern city of Karachi. More than 130 people have been killed in the run-up to the vote, mostly secular party candidates and workers. Most attacks have been traced to Taliban militants, who have vowed to disrupt a democratic process they say runs counter to Islam.
The vote is being watched closely by Washington since the U.S. relies on the country of 180 million people for help in fighting Islamic militants and negotiating an end to the war in neighboring Afghanistan.
The rise of former cricket star Imran Khan, who has almost mythical status in Pakistan, has challenged the dominance of the country's two main political parties, making the outcome of the election very hard to call.
"I think it is the most unpredictable election Pakistan has ever had," said Moeed Yusuf, South Asia adviser at the United States Institute of Peace. "The two-party dominance has broken down, and now you have a real third force challenging these parties."
The election of both the national and provincial assemblies comes at a time of widespread despair in Pakistan, as the country suffers from weak economic growth, rampant electricity and gas shortages, and a deadly Taliban insurgency.
The bombings that killed three people Friday occurred in Miran Shah, the main town in the North Waziristan tribal area, a major sanctuary for the Pakistani Taliban. The blasts also wounded 15 people, said intelligence officials, speaking on condition of anonymity because they were not authorized to talk to the media.
The candidate who was gunned down in Karachi, Shakil Ahmed, was running as an independent for the provincial assembly, said police officer Mirza Ahmed Baig.
There is concern that the violence could benefit Islamist parties and those who take a softer line toward the militants, including Khan and former Prime Minister Nawaz Sharif, because they were able to campaign more freely. The government said it would deploy 600,000 security personnel on election day.
After more than a decade in the political wilderness, the Oxford-educated Khan has emerged as a force in the last two years with the simple message of "change." He has tapped into the frustrations of millions of Pakistanis _ especially urban middle class youth _ who believe the traditional politicians have been more interested in enriching themselves through corruption than governing.
The two main parties that have dominated politics _ the Pakistan People's Party, which led the most recent government, and Sharif's Pakistan Muslim League-N _ have ruled the country a total of five times in the past 25 years.
Khan has also struck a chord by criticizing Pakistan's unpopular alliance with the U.S. and controversial American drone attacks against Islamic militants in the country's northwest tribal region.
"I am happy to vote for the person of my choice," said Mohammed Ayub, who was the first man to vote at a polling station in Islamabad. "I am voting for Imran as he is a strong voice against wrongs."
Support for the 60-year-old Khan may have increased out of sympathy following a freak accident this week at a political rally in which he fell 15 feet (4.5 meters) off a forklift, fracturing three vertebrae and a rib. He is expected to make a full recovery and seems to be making the most of the accident. The party has repeatedly aired an interview he did from his hospital bed hours after the fall as a paid advertisement on TV.
Nobody is sure how effective he will be in translating his widespread popularity into votes, especially considering he boycotted the 2008 election and only got one seat in 2002. Turnout will be critical, especially among the youth. Almost half of Pakistan's more than 80 million registered voters are under the age of 35, but young people have often stayed away from the polls in the past.
Khan faces a stiff challenge from the two main parties, which have spent decades honing vote-getting systems based on feudal ties and political patronage, such as granting supporters government jobs.
Because of the strength of this old-style politics and unhappiness with the outgoing government, many analysts see the Pakistan Muslim League-N as the front-runner in the election. Sharif has twice served as prime minister and is best known for testing Pakistan's first nuclear weapon in 1998.
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, known for its pro-business policies, came in second in the 2008 elections and is seen as more religiously conservative than the Pakistan People's Party.
On the campaign trail, Sharif pointed out how much more experience he has than Khan and touted key projects he completed while in office, including a highway between the capital Islamabad and his hometown of Lahore. He's also credited with refraining from attacking the outgoing government and allowing it to finish its full term as a way of strengthening civilian government control.
A poll released this week by a Pakistani political magazine, Herald, showed the two parties led by Sharif and Khan as basically tied, with about 25 percent support each. The Pakistan People's Party was third with about 18 percent. The margin of error was less than three percentage points. But national polls like this do not necessarily reflect election results because seats are granted to whoever gets the most votes per constituency, rather than proportionally across the parties.
Even if the Pakistan Muslim League-N wins the most national assembly seats, many analysts doubt it will have a majority, meaning it would have to cobble together a ruling coalition that could be quite weak.
The performance of the Pakistan Muslim League-N could be heavily influenced by how well Khan's party does.
Both parties appeal to conservative middle class voters in cities in Pakistan's most populous province, Punjab, which will be the main battleground of the election. The province contains over half of the 272 directly elected seats in the national assembly. The Herald poll showed about 39 percent support for Sharif's party in Punjab and close to 31 percent for Khan.
If Khan's party can steal enough votes away from Sharif, it might open the way for the Pakistan People's Party to once again form the government. Despite widespread unhappiness with the party's performance over the past five years, it does have a loyal following in rural areas of southern Sindh province and southern Punjab.
A less likely scenario is that the "political tsunami" Khan has promised does really sweep the country, leaving his party to form the next government.
Given the likelihood of a weak coalition no matter who emerges on top, the new government could have trouble tackling the country' major problems. Two of the most immediate are the electricity crisis, with some parts of the country experiencing blackouts for up to 18 hours a day, and the government's shaky financial situation. The caretaker government is already in discussions with the International Monetary Fund about another unpopular bailout to shore up the country's finances.
The next government will also face the tricky task of managing the relationship with the country's army, which is still considered the strongest institution in Pakistan.
The previous government was able to complete its term largely because the army chief, Gen. Ashfaq Parvez Kayani, held off from directly intervening in politics. However, he is believed to play a dominant role in the background, especially when it comes to foreign policy issues such as the relationship with the U.S. and the country's stance toward the Afghan war. Sharif has a particularly complicated history with the army since he was toppled in a coup.
Given the views of Sharif and Khan, the next government is expected to be more nationalistic and protective of the country's sovereignty when it comes to ties with the U.S. than its predecessor. Sharif likes to recount how he tested Pakistan's first nuclear weapon despite intense U.S. pressure. Khan has been even more critical of Pakistan's alliance with the U.S. and has even threatened to shoot down American drones if he came to power.
But the impact of their views will likely be tempered by the role of the Pakistani army, which values its relationship with the U.S. because of the billions of dollars it has received in military aid.
The army is expected to play a similarly predominant role when it comes to Pakistan's stance toward domestic Taliban militants at war with the state. Both Sharif and Khan have backed negotiations with the Taliban, and Khan has even said he would pull troops out from the tribal region who are battling the militants.
His nickname "Taliban Khan" reflects sentiments among some Pakistanis that he's too soft on the Taliban. Kayani, the army chief, has said the Taliban must accept the country's constitution if it wants peace _ something the militants have rejected.
Associated Press writers Atif Raza in Karachi and Rasool Dawar in Miran Shah, Pakistan, contributed to this report.
Sebastian Abbot can be followed on Twitter at https://twitter.com/sebabbot