The 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)

Afghan voters defied Taliban threats Saturday as they voted for a new president in a landmark election that was marred by scattered deadly attacks and mounting reports of fraud.

With relatively strong turnout and no massive attacks, the runoff election appeared to represent a victory for Afghan security forces, which had braced for a wave of coordinated Taliban assaults. But competing claims of fraud and irregularities by the campaigns of the two men on the ballot raised the prospect of a disputed result, a scenario that could engulf Afghanistan in destabilizing uncertainty at the height of the U.S. military drawdown.

The contest has the potential to mark the first peaceful handover of power in Afghanistan’s history. That outcome would enable the United States to wind up its combat mission here by the end of the year, keep a residual force in place and continue funding the impoverished nation.

Afghans who cast ballots said they were hopeful that a new president would usher in a brighter era in a country that has been at war for 13 years and faces an economic meltdown as the West disengages.

“For all Afghan people looking for freedom, this is a good day, an important day,” said Naila Sharifi, 35, a gynecologist who voted in Kabul shortly before the polls closed. She said she was undeterred by the Taliban threats. “All the women casting votes today are doing so to punch the Taliban in the face,” she said.

Although preliminary results have yet to be released, representatives of the contenders, former foreign minister Abdullah Abdullah and former finance minister Ashraf Ghani, expressed confidence late Saturday that their candidate had won — contentions that could presage a protracted dispute.

Ahmad Yousuf Nuristani, the head of the country’s election commission, said an estimated 7 million people cast ballots, more than half of the 12 million who are eligible. An estimated 62 percent of voters were men, he said. Of the country’s 6,365 polling stations, 140 didn’t open due to security threats, he added.

Western officials — including Secretary of State John F. Kerry, who praised the “brave Afghans” who went to the polls — hailed the vote. The U.S.-led military coalition called it a “successful election” that “clearly demonstrates that Afghan people are confident in the security provided by their own forces.”

Representatives of the two campaigns said their teams had received reports of serious irregularities. Both teams said that polling stations in several provinces had run out of ballots.

Hamidullah Farooqi, a representative of Ghani’s campaign, said Afghan security forces had in some instances coaxed voters to support Abdullah and prevented potential voters from reaching polling stations in areas where Ghani is presumed to be the favorite.

“This caused trouble for our people and for people’s participation,” he said.

Afghan soldiers and police officials said civilians were responsible for much of the alleged fraud.

Mahmoud Saiqal, a representative of Abdullah’s campaign, said local observers had reported instances of ballot stuffing in a few southeastern provinces.

“When voters turned up in some of the polling stations early in the morning, they found that the boxes had already been filled the previous night,” he said.

The day began somewhat ominously in Kabul and other parts of eastern Afghanistan as several rockets detonated shortly before polling stations opened. Interior Minister Omar Daudzai said at least 11 policemen, 15 soldiers and 20 civilians, including an election official, were killed during the attacks. In the western province of Herat, insurgents sliced off the fingers of 11 people who voted, ministry officials said.

While U.S. officials clearly wanted a a successful election, they were careful to remain far from polling stations, so the process would be seen as wholly Afghan.

Gen. Stephen M. Townsend, the top American commander in eastern Afghanistan, flew across the region to observe the network of checkpoints set up in some of the country’s most inhospitable terrain. He also visited regional command centers where Afghan officials managed a vast security apparatus.

In the eastern Paktia province, insurgents began firing rockets Friday night in an apparent attempt to intimidate voters, said Gen. Mohammad Yaftali, the commander of the army’s 203rd Corps.

“They’ve been shooting rockets and mortars since last night, trying to create fear so people don’t vote,” he said, adding that more than three dozen insurgents had been killed in the area where his corps operates.

Gen. Dawlat Waziri, the commander of the Afghan army’s 201st Corps, said that by early afternoon there were about 120 Taliban attacks in the seven provinces under his command.

“The Taliban learned from some of their mistakes last time, but they still could not defeat us,” Waziri said.

In certain cases, Afghan forces requested that U.S. helicopters circle over the sites of attacks — a “show of presence” to deter insurgents. When one helicopter flew over one such site, two flashes of gunfire came from below in an apparent effort to target the aircraft.

Still, U.S. officials expressed optimism that violence wouldn’t be the dominant theme of the historic day.

“I think security will not be the issue today, but, as you sense it, the potential for fraud,” Townsend told a senior Afghan commander.

Sayed Yasen, a 23-year-old journalist from the central province of Ghowr, said he anticipated that at least 20 percent of ballots counted in the election would be fraudulent. He said that was a tolerable margin for a country with entrenched corruption and a young democracy.

“I’m hopeful the situation will improve,” he said. “If not, we’ll have a return to warlordism, which will mean chaos.”

At a polling station across town, Farouq Azam said most Afghans recognize that electing a new president will not fix the country’s problems.

“People are hopeful, but they don’t think there will be much change,” he said. “Unless there is peace, there will continue to be war.”

Ghani and Abdullah sharpened their criticism of each other during the final weeks of the race and have warned that state institutions were biased against them. Many Afghans fear that if the result is close, the loser could refuse to concede the race, alleging state interference or widespread fraud.

“Vigilance and oversight are essential, and allegations of fraud need to be addressed,” said U.S. Ambassador James B. Cunningham in a statement. “But the candidates and their supporters should refrain from premature judgments and from criticism that is not supported with clear evidence.”

Both men have promised to sign a security pact with the United States soon after being sworn in, a promise that has made Washington eager to see the end of President Hamid Karzai’s tenure.

Official preliminary results are not expected before early July.

Sayed Salahuddin and Mohammad Sharif contributed to this report.