Election officials in Afghanistan say millions of people cast their votes for members of a new National Assembly and local councils. Despite several bloody attacks across the country, election organizers say voting went smoothly in most places.

The United Nations chief election officer, Peter Erben, told reporters security concerns kept a handful of voting centers scattered around the country from opening.

But he told reporters before polls closed, the insurgent attacks, which included a rocket fired onto the U.N. compound, failed to disrupt the elections.

"We are open for polling in all districts of the country," he said. "The issues we have with opening a few polling centers is really the exception to the general situation of being open everywhere."

More than 6,000 candidates, including nearly 600 women, competed for seats on the country's new National Assembly and 34 district councils.

Election organizers say it will take at least two weeks to count the millions of multi-page ballots.

The election is considered a key test of Afghanistan's ability to establish a functioning democracy.

After decades of war and authoritarian rule, people here say they welcomed the opportunity to select their own representatives.

Outside a crowded polling station in central Kabul, voters displayed their index fingers, dyed a deep purple to show they cast their ballots.

Mohammad Sadiq, 44, told VOA, the election was a proud day for Afghanistan.

After more than 25 years, he says, the government here will serve the people, and not the other way around.

But questions remain regarding how rapidly the country will be able to evolve into a modern democracy.

More than half the population is illiterate, and many parts of the country are divided along ethnic and tribal lines.

Another potential problem is the candidates themselves, some of whom are former warlords or alleged surrogates for Afghanistan's powerful drug cartels. But election organizers say they remain confident the country is ready for the challenges of self-government.

President Hamid Karzai, after he voted Sunday afternoon, said the election was a turning point in Afghanistan's history.

After 30-years of war, interventions, occupation and misery, he said, Sunday was a day of self-determination.