Militants failed to mount a single major attack anywhere in Afghanistan by the time polls closed, and voters lined up despite heavy rain and cold in the capital and elsewhere.
“Whenever there has been a new king or president, it has been accompanied by death and violence,” said Abdul Wakil Amiri, a government official who turned out early to vote at a Kabul mosque. “For the first time, we are experiencing democracy.”
After 12 years with President Hamid Karzai in power, and decades of upheaval, coup and war, Afghans on Saturday were for the first time voting on a relatively open field of candidates.
Election officials said that by midday more than three and a half million voters had turned out — already approaching the total for the 2009 vote. The election commission chairman, Mohammad Yusuf Nuristani, said the total could reach seven million. “The enemies of Afghanistan have been defeated,” he declared.
But even as they celebrated the outpouring of votes, many acknowledged the long process looming ahead, with the potential for problems all along the way.
International observers, many of whom had fled Afghanistan after a wave of attacks on foreigners during the campaign, cautioned that how those votes were tallied and reported would bear close watching.
It is likely to take at least a week before even incomplete official results are announced, and weeks more to adjudicate Election Day complaints. Some of the candidates were already filing fraud complaints on Saturday.
With eight candidates in the race, the five minor candidates’ shares of the vote made it even more difficult for any one candidate to reach the 50 percent threshold that would allow an outright victory. A runoff vote is unlikely to take place until the end of May at the earliest.
The leading candidates going into the vote were Ashraf Ghani, 64, a technocrat and former official in Mr. Karzai’s government; Abdullah Abdullah, 53, a former foreign minister who was the second biggest vote-getter against Mr. Karzai in the 2009 election; and Zalmay Rassoul, 70, another former foreign minister.
Both Mr. Ghani and Mr. Abdullah praised the vote. “A proud day for a proud nation,” Mr. Ghani said.
Still, a shortage of ballots at polling places was widespread across the country by midday Saturday, and some voters were in line when polls closed.
More worrisome, the threat of violence in many rural areas had forced election authorities to close nearly 1,000 out of a planned-for 7,500 polling places, raising fears that a big chunk of the electorate would remain disenfranchised. Still, a shortage of ballots at polling places was widespread across the country by midday Saturday, and some voters were in line when polls closed.
But when it came to attacks on Election Day, the Taliban’s threats seemed to be greatly overstated. Only one suicide bombing attempt could be confirmed — in Khost — and the bomber managed to kill only himself when the police stopped him outside a polling place.
In three scattered attacks on polling places, four voters were reported killed. Two rockets fired randomly into the city of Jalalabad wounded eight civilians. One border policeman, in southern Kandahar Province, and another policeman in remote western Farah Province were confirmed killed in Taliban attacks, according to preliminary reports.
Bad as all that was, it was a lower casualty toll than on a normal day in Afghanistan, let alone an election on which both the insurgents and the government had staked their credibility. Interior Minister Umar Daudzai said there were 140 attacks nationwide on Saturday, compared with 500 attacks recorded by the American military in 2009.
In preparation for the election, the Afghan government mobilized its entire military and police forces, some 350,000 in all, backed up by 53,000 NATO coalition troops — although the Americans and their allies stayed out of it, leaving Afghans for the first time entirely in charge of securing their own election.
“Voting on this day will be a slap in the faces of the terrorists,” said Rahmatullah Nabil, the acting head of the National Directorate of Security, the Afghan domestic intelligence agency.
Sensitive to concerns about potential fraud — more than a million ballots were thrown out in the 2009 presidential vote and then again in the 2010 parliamentary elections — the police were quick to report their efforts to crack down on Saturday.
Among those arrested were four people in Khost who were caught with 1,067 voter registration cards. Several people, including an election official, were caught trying to stuff ballot boxes in Wardak Province.
“This has been the best and most incident-free election in Afghanistan’s modern history and it could set the precedent for a historic, peaceful transition of power in Afghanistan,” said Mohammad Fahim Sadeq, head of the Afghanistan National Participation Organization, an observer group.
In many places where voting was nearly impossible in 2009, the turnout was reported to be strong. One was Panjwai district, a once-violent haven of the Taliban just outside Kandahar City, where hundreds lined up to vote. “I left everything behind, my fears and my work, and came to use my vote,” said Hajji Mahbob, 60, a farmer. “I want change and a good government and I am asking the man I am going to elect as the next president to bring an end to the suffering of this war.”
Even where the Taliban did manage to strike, voters still turned out afterward. A bomb set off at a polling place in the Mohammad Agha district of Logar Province killed two voters and wounded two others, according to the district governor, Abdul Hamid. “The explosion dispersed the voters who were holding their voting cards and waiting to vote,” said Zalmai Stanakzai, a car repair shop owner who was there. “Some of us left, the others stayed. I was concerned about our safety, but we considered voting our duty.”
Insurgents set off a series of five blasts in the Shomali plain, just north of Kabul city, in the village of Qarabagh. “After the explosions, the polling stations reopened and people rushed to vote,” said Mohasmmad Sangar, 32, a used-car salesman there. “It was a great day today.”
Nicholas Haysom, the United Nations’ top election official here, said: “We know that the Taliban have made a very explicit and express threat to disrupt it. The failure to disrupt the elections will mean that they will have egg on their face after the elections.”
While there were reports of disrupted voting in troubled places like Logar Province and neighboring Wardak, in Helmand Province in the south and Nangarhar Province in the east, at the same time voters were showing up in unexpectedly high numbers in other places, like Zabul, Uruzgan and Kandahar Provinces in the south, and Kunar Province in the northeast, despite strong insurgent presences in those areas.
In Uruzgan, election authorities had to open additional polling places to accommodate unexpected numbers, while in Daikundi they ran out of ballots in some remote districts and election authorities had to race new ones out to them. In northern Mazar-i-Sharif, voters were still lined up after dark.
Underwritten by $100 million from the United Nations and foreign donors, the election was a huge enterprise, stretching across extremely forbidding terrain. Some 3,200 donkeys were pressed into service to deliver ballots to remote mountain villages, along with battalions of trucks and minibuses to 6,500 polling places in all. The American military pitched in with air transport of ballots to four regional distribution centers, and to two difficult-to-reach provinces.
Though many international observers left Afghanistan in the wake of attacks on foreigners, or found themselves confined to quarters in Kabul, years of expensive preparations and training of an army of some 70,000 Afghan election observers were expected to compensate, according to Western diplomats and Afghan election officials. “We have so many controls now, it’s going to be much safer this time,” said Noor Ahmad Noor, the spokesman for the Independent Election Commission.
The American ambassador, James B. Cunningham, called the elections a “really historic opportunity for the people of Afghanistan to move forward with something we’ve been trying to create together with them for several years now.”
Still up in the air is the question of whether an American troop force will remain in Afghanistan after 2014. Mr. Karzai’s refusal to sign a long-term security deal to allow that presence was a major point of tension between the American and Afghan governments. Each of the leading candidates has agreed to sign the deal once in office, though inauguration day may not take place until well into the year.
The election on Saturday was notable also for how many Afghan women were taking part. More female candidates than ever before are on provincial ballots, and two are running for vice president, the first time a woman was ever put up for national office here, which has generated a great deal of enthusiasm, especially in urban areas.
At the women’s polling station in the Nadaria High School, in Kabul’s Qala-e-Fatullah neighborhood, among those lining up to vote was a young mother, Parwash Naseri, 21. Although wearing the blue burqa that is traditional here, she was still willing to speak out through the privacy mesh covering her face
She was voting, for the first time, for her children and for women’s rights, she said, speaking in a whisper. “I believe in the right of women to take part just as men do, to get themselves educated and to work.”
Reporting was contributed by Jawad Sukhanyar and Habib Zahori from Kabul, Farooq Jan Mangal from Khost, Khalid Alokozai from Jalalabad, and Taimoor Shah from Kandahar.
A version of this article appears in print on April 6, 2014, on page A1 of the New York edition with the headline: Afghan Turnout Is High as Voters Defy the Taliban.