(CNN) – President Barack Obama on Saturday praised the high turnout of voters in the first democratic transfer of presidential power in Afghanistan's history.
Increased violence ahead of the elections threatened to keep voters home, but long lines at polling centers across the country showed the determination of the Afghan people to have their voices heard.
As the U.S. draws down its forces in Afghanistan, the President called on officials to follow through on the election results.
"We look to the Afghan electoral bodies to carry out their duties in the coming weeks to adjudicate the results - knowing that the most critical voices on the outcome are those of Afghans themselves," Obama said in a statement.
Allegations of fraud overshadowed the last elections held in 2009, when President Hamid Karzai was elected to a second term.
Karzai is constitutionally bound to step down when his current term runs out.
Disagreements over the role of U.S. security forces in Afghanistan have led to tensions between Karzai and Obama.
The Afghan leader has refused to sign a U.S.-Afghanistan bilateral security agreement, while the two leading candidates in Saturday's election have said they would.
Obama praised high Afghan interest in the election.
"We commend the Afghan people, security forces, and elections officials on the turnout for today's vote - which is in keeping with the spirited and positive debate among candidates and their supporters in the run-up to the election."
Nearly 1,000 polling sites were closed because of security concerns and officials told CNN that 20 Afghans were killed in violence Saturday. However, a heavy security presence across the country met with relatively little trouble and ensured that the vote went largely smoothly.
Preliminary results will be announced later this month.
Secretary of State John Kerry added his own praise for the many Afghans who risked their lives to cast their vote.
"The fierce determination of the millions of voters undeterred by violence and threats of violence has been remarkable," Kerry said in a statement.
Obama also called attention to America's investment in democracy and peace in Afghanistan.
"We also pay tribute to the many Americans - military and civilian - who have sacrificed so much to support the Afghan people as they take responsibility for their own future," Obama said.
However, both Obama and Kerry signaled that American investment in the future of Afghanistan is not over, even as U.S. troops leave.
"The United States remains ready to work with the next president of Afghanistan. We will continue to stand with the people of Afghanistan as they work to build a democratic future," Kerry said in his statement.
With eight candidates in the running there is the possibility that no candidate wins a majority in the first round, resulting in a runoff vote that would take place next month.
– CNN's Cassie Spodak contributed to this report.