Millions of Afghans voted in a mostly peaceful run-off to elect a successor to President Hamid Karzai on Saturday, a decisive test of the country's ambitions to transfer power democratically for the first time in its tumultuous history.
Most foreign troops will leave by the end of 2014, and whoever takes over from Karzai will inherit a troubled country plagued by an assertive Taliban insurgency and an economy crippled by corruption and the weak rule of law.
- All of these celebrities have had their nudes leaked 35 Pictures
- PHOTOS: Apple Emoji update includes a llama, skateboard and some bagel drama 24 Pictures
The election pitted former anti-Taliban fighter Abdullah Abdullah against ex-World Bank economist Ashraf Ghani after neither secured the 50 percent majority needed to win outright in the first round on April 5.
There were far fewer incidents of violence than had been feared and, as after the first round of voting, there was a palpable sense of relief in the Afghan capital. Voting ended at 4 p.m. (1130 GMT).
"I'm from this country so I am never afraid of threats," said Lajiullah Azizi, a hospital worker who voted in western Kabul just minutes after a small bomb exploded at his polling station. "I hope this election will bring peace."
Officials immediately began counting ballots, although Afghanistan's difficult terrain, where ballot boxes have to hauled by donkey from some of its remotest corners, means preliminary results will not be known until July 2.
"Based on what I saw, it's been a very calm election day with vigilant security," Thijs Berman, the chief observer of the EU Election assessment team in Afghanistan, told Reuters.
Karzai, standing down after 12 years in power marked by increasingly sour relations with the West, is certain to retain a hand in politics but has been tight-lipped about his plans.
"Today Afghanistan takes a step towards stability, development and peace. Come out and determine your destiny," Karzai, clad in his trademark green Afghan robe, said after casting his ballot.
Later, in a video distributed by his office, he added: "This is a major step at a time when Afghanistan’s enemies try to disrupt the election."
The main source of contention with the West is Karzai's refusal to sign a security pact with the United States allowing a small contingent of U.S. forces to remain in the country beyond 2014. Both Abdullah and Ghani have promised to sign it promptly.
"Looking ahead, the United States stands ready to work with the next president of Afghanistan," the U.S. ambassador to Afghanistan, James B. Cunningham, said in a statement.
"Today marks the start of a new era for Afghanistan, and Afghans can be proud of what they have achieved."
Twelve million voters were eligible to cast ballots at 6,365 polling centers across Afghanistan, from windswept deserts on the Iranian border to the rugged Hindu Kush mountains.
There were isolated cases of violence but voters were not put off by a couple of rockets landing in Kabul and other attacks, in which one person was reported injured. Long queues snaked out of polling centers soon after voting began at 7 a.m.
Rocket attacks were also reported in Ghazni province.
In a more serious incident, two tribal elders were killed when they defied a Taliban warning in Kunar province not to participate in the elections, triggering a gun battle between villagers and insurgents, local officials said. Four rockets landed in the provincial capital. No casualties were reported.
Overall, there were 150 roadside bombs, magnet bombs and rocket attacks, according to the interior ministry. Deputy Interior Minister Ayoub Salangi said 14 people were killed and 41 wounded.
The turnout was so high that some 333 voting centers ran out of ballot papers, sparking minor protests by disgruntled voters. The election commission said additional materials were later distributed and calm was restored.
"Security is a concern but the people of Afghanistan have defied security threats so far," Abdullah said.
The election has been fraught with accusations of fraud by both candidates and many fear a close outcome will make it less likely the loser will accept defeat, possibly dragging Afghanistan into a risky, protracted stand-off over the vote.
"We ask everyone to prevent and discourage people from fraud and vote-rigging so that we can have a transparent, free and fair election," Ghani said after casting his vote in west Kabul.
Officials are concerned by the prospect of a close outcome that could, in the worst case scenario, propel the country back into war along ethnic lines.
Both candidates set the stage for complaints, repeatedly accusing electoral organizers of incompetence and bias.
The United Nations has urged candidates not to attack the organizers, to safeguard the process.
"There's a short-term gain only in trying to undermine or bully the institutions at the expense of their legitimacy," said United Nations deputy chief Nicholas Haysom.
"It's going to be the legitimacy of the elections which will give legitimacy to the new head."
Abdullah polled 14 percentage points ahead of Ghani in the first round with 45 percent of the vote, but Ghani, who is ethnic Pashtun, stands to gain a portion of the Pashtun vote that was splintered in the first round.
Pashtuns are Afghanistan's biggest ethnic group, making up about 45 percent of the population. While Abdullah is partly Pashtun, he is identified more with the ethnic Tajik minority.
The chance of an equal split between candidates is hard to gauge because there are few reliable polls. ACSOR research center, asking respondents to choose between Abdullah and Ghani, predicted a 50:50 split before the first round.