The April vote to decide President Hamid Karzai's successor could mark Afghanistan's first ever peaceful transfer of power. The Post's Ernesto Londoño explains what's at stake for the U.S. (Kate M. Tobey and Gillian Brockell/The Washington Post)

Afghans vote Saturday in an election that could deliver the first peaceful transfer of power in the nation’s history. But Western and Afghan officials worry the presidential race could be marred by a disputed result, massive fraud or insurgent attacks.

The Taliban has vowed to violently thwart the election, and the mood across the country appeared to be wary as security forces made last-minute efforts to secure polling stations.

The United States, which has sought to play a very low-key role in the process, has a huge amount at stake. If a new president is sworn in relatively smoothly in the coming weeks, the Obama administration may have a fighting chance of winding down a deeply unpopular, 13-year war with a semblance of dignity and may be able to maintain a small military contingent here for at least a couple of years.

The presidential candidates, Abdullah Abdullah and Ashraf Ghani, have pledged to maintain a close military relationship with the United States. Both served in the cabinet of President Hamid Karzai, who has led the country since December 2001, after the Taliban regime was toppled.

The streets of Afghanistan’s normally teeming capital were largely deserted this week as officials shut down schools and government buildings in an effort to make security more manageable.

Turnout in the first round of the election in April was relatively high, and some Afghans expressed faith that a new leader could steady a country gripped by uncertainty as war rages on and foreign troops withdraw.

“People have to go vote for a better future,” said Hussein Faqiri, 35, who sells green beans from a wooden cart in western Kabul. “If you want to get rid of insecurity and unemployment, you need to go vote.”

Others see the exercise as futile. A few blocks from the market where Faqiri was working, Zayed Noor Ali, 32, said he wouldn’t bother lining up at a polling station Saturday.

“If President Karzai could not defeat the Taliban with broad support from the international community, without a NATO presence here these guys can’t defeat the Taliban,” said Ali, who runs a photo studio.

Each candidate has sought to cast himself as the agent of change this impoverished nation desperately needs at a time when the international community is disengaging and the economy is in a tailspin.

With no major policy disagreements between the men, the race has increasingly become about style and personality.

Abdullah, a former foreign minister who lost to Karzai in a fraud-marred election in 2009, emerged as the front-runner in the April 5 first round, obtaining 45 percent of votes cast. In recent weeks, he has secured the endorsement of influential warlords and power brokers.

During rallies, Abdullah has sought to burnish his religious credentials in this conservative Muslim nation by opening speeches with recitations from the Koran, displaying a greater degree of piety than he has in the past.

Abdullah, an ophthalmologist who was a prominent member of the Northern Alliance faction in the civil war of the 1990s, narrowly escaped an assassination attempt last week.

Ghani, a former senior World Bank economist, took a jab at Abdullah’s camp during his final campaign appearance, noting that a close ally of his rival had been a shareholder in Kabul Bank, which collapsed in 2010 amid revelations that it was run like a Ponzi scheme.

Ghani, a former finance minister, won 35 percent of votes in the first round.

In the final days of the campaign, the two teams have sharpened their criticism of each other. Ghani’s camp has portrayed Abdullah as a return to the country’s dark past; Abdullah’s team accuses Ghani of lacking Afghan street credibility.

Both candidates have accused segments of the Afghan government of bias in the race, laying out a potential argument to contest the results if the election is close. Ghani has been critical of the Interior Ministry, which oversees the police, while Abdullah has charged that the country’s electoral commission has failed to properly investigate fraud claims.

A protracted election dispute could worsen Afghanistan’s fragile security situation and damage its economy.

In an effort to minimize fraud, both campaigns planned to have election observers stationed across the country. The Ghani team had said it would hire 50,000 observers who would each be paid $50 for a day’s work — a significant wage in much of Afghanistan.

Officially, presidential candidates are not permitted to spend more than $200,000 on their campaigns. But Ghani and Abdullah have crisscrossed the country in chartered planes, hosted dozens of massive dinner parties and paid for numerous billboards and large teams of bodyguards.

Afghan officials have expressed confidence that the country’s security forces will keep polling sites safe Saturday. But due to security concerns, officials have decided not to open 100 polling sites that were functional during the first round. More than 6,355 will be operational.

While the first round was preceded by high-profile terrorist attacks, the lead-up to the runoff has been comparatively quiet. But in a statement this week, the Taliban told Afghans not to go to the polls, warning of “decisive attacks.”

“By holding elections, the Americans want to impose their own stooges on the people by deceiving them,” the insurgents’ statement said.

American officials have not signaled a preference for either candidate, but they are eager to see the end of Karzai’s term. The outgoing president has refused to sign a security pact that would allow the United States and a handful of allies to keep some troops in Afghanistan after the end of the year.

“We have what I think will be a willing partner in the next Afghan president, whichever one that is,” Gen. Philip M. Breedlove, NATO’s supreme allied commander, told the American Forces Press Service this week.

Kevin Sieff, Sayed Salahuddin and Mohammad Sharif contributed to this report.