Reports of violence came in from around Afghanistan as it sought to claw its way back from more than a quarter-century of conflict, but there were no immediate signs of a spectacular attack that officials had feared from Taliban militants who had vowed to disrupt the vote.
Violence in the two days leading up to the vote left at least 22 people dead, including a French commando killed when his vehicle struck a mine.
Early Sunday, fierce fighting in an eastern Afghanistan left three militants and two policemen dead and two U.S. troops wounded, officials said.
But Sunday was mostly about getting out to vote.
"We are making history," President Hamid Karzai said as he cast his ballot. "It's the day of self-determination for the Afghan people. After 30 years of wars, interventions, occupations and misery, today Afghanistan is moving forward, making an economy, making political institutions."
Some 12.4 million Afghans were registered to vote for the national legislature and provincial assemblies at more than 6,000 polling stations, guarded by about 100,000 Afghan police and soldiers and 30,000 foreign troops.
Around 8 million voted in last October's presidential elections, and there were high hopes that even more would turn out Sunday.
However, although top election organizers said they had no official turnout figures yet, some officials in the field, as well as independent election monitors, said there appeared to be fewer people voting.
"It's hard to gauge the exact numbers, but the impression we have is that the turnout is lower," said Saman Zia-Zarifi, deputy Asia director for New York-based Human Rights Watch, which has 14 observers monitoring the elections.
Chief electoral officer Peter Erben said voting started slowly, but "after the morning, it has seriously picked up all over Afghanistan."
Polls closed at 4 p.m., although those already in line would be allowed to vote, he said.
Enthusiasm ran high.
"Today is a magnificent day for Afghanistan," said Ali Safar, 62, standing in line to vote in Kabul. "We want dignity, we want stability and peace."
The vote was seen as the last formal step toward democracy on a path set out after a U.S.-led force drove the Taliban from power in 2001, when they refused to hand over al Qaeda leader Osama bin Laden following the Sept. 11 attacks.
Many people hoped the polls would marginalize the insurgents and end a spiral of violence that started in 1979 when Soviet troops invaded, before a devastating civil war and the oppressive rule of the hard-line Taliban.
The Taliban said they would not attack civilians heading to polls, but warned them to stay away from areas where militants might attack security forces and foreign troops.
Afghans clutching voter identification cards filed into schools with lessons still scrawled on blackboards, or stepped over piles of shoes to cast ballots in mosques. Tents served as polling stations in remote areas.
About 2,760 candidates are competing for 249 seats in the Wolesi Jirga, parliament's lower house, and more than 3,015 candidates are running for 420 seats in 34 provincial councils.
Women are assured 68 seats in the lower house, while 10 seats are reserved for Kuchi nomads. In the provincial councils, a quarter of all seats have been set aside for women.
With nearly three-quarters of the populace illiterate, voting was slow as people spent as much as 10 minutes going through ballots up to seven pages long to find pictures of candidates or symbols that represent them. Each voter dipped a finger in indelible purple ink to prevent repeat voting.
Women, some in all-encompassing burqas, were segregated from men at many polling centers, entering through back doors and voting in separate rooms.
At a Kuchi nomad voting center east of Kabul, an Associated Press Television News cameraman saw women handing their ballots to men to fill out as electoral officials looked without intervening. Human Rights Watch said children appeared to vote at one polling station northeast of Kabul.
In the Kunar region, "three to five" polling centers were closed because of small-arms fire nearby, then reopened after security forces restored calm, Erben said.
Security forces said Saturday they had thwarted at least four bombings, including an attempt to blow up a massive dam.
During the six months leading up to the vote, violence killed 1,200 people, including seven candidates and four election workers.