After a relatively peaceful and orderly start, Afghanistan's first presidential election was thrown into chaos Saturday after 15 candidates opposing President Hamid Karzai declared the results invalid, complaining of fraud and improper procedures.

The contretemps threatened to ruin the credibility of a historic election that has cost foreign donors almost $200 million, seen more than 10 million Afghans register to vote and been viewed as a milestone in the country's transformation into a stable, modernizing country after 25 years of war and turmoil.

The candidates' complaints stood in sharp contrast to the enthusiastic spirit of hundreds of thousands of Afghans who lined up outside village schools and mosques on a chilly, wind-swept morning to cast the first votes of their lives. Whoever won, they told visitors over and over, they hoped the election would bring peace and security.

The national election commission, composed of members from Afghanistan and the United Nations, said Saturday afternoon that it would allow the election to proceed despite the candidates' protests but that it would investigate complaints of irregularities. The polls closed at 6:30 p.m., and ballot-counting was expected to take days because of the remote locations of many polling stations.

"Given the complexities of this electoral process, there have inevitably been some technical problems," said J. Ray Kennedy, an election commission official. But given the large turnout and "peaceful environment" of the vote -- for which the European Union, the Organization for Security and Cooperation in Europe and other international groups supplied monitors -- it would be "unjustified" to halt the election and deny many Afghans their fundamental rights, he said.

Since responding to the Sept. 11, 2001, attacks on the United States with a military offensive that toppled Afghanistan's Taliban rulers, the Bush administration had eagerly sought elections that would give Afghans a chance to pick their leaders and would be seen as a major U.S. foreign policy success. With U.S. backing, Karzai was named interim president in late 2001 under a U.N.-sponsored democratization process that has already advanced through two national assemblies, a new constitution and voter registration.

Karzai, who has been heavily favored to win a majority of votes, insisted Saturday evening that the election had been "free and fair." He urged all candidates to accept the results and to "respect our people, because in the dust and snow and rain, they waited hours and hours to vote."

But his opponents, a range of ethnic politicians, former officials, tribal leaders and professionals, declared repeatedly during the day that the election should be nullified, suspended and held again, largely because of a widespread mix-up over indelible ink that was supposed to mark voters' thumbs to prevent them from voting more than once.

During a day-long tour of polling sites in three provinces, a Washington Post reporter saw many instances in which poll workers mistakenly inked voters' thumbs with black marking pens intended to be used on ballots instead of the purple indelible ink supplied to prevent fraud.

Voters expressed concern at the ease with which the black ink rubbed off, but no one at a dozen polling stations, including designated agents for various candidates, complained of deliberate fraud.

But in Kabul, opposition candidates met for much of the afternoon at the home of Abdul Sattar Sirat, a former cabinet minister and one of Karzai's challengers. "Any government that comes to power as a result of today's election has no credibility and no validity," Sirat said after the meeting.

The controversy came as a shock to Afghan and international election officials, who had warned of possible attacks at the polls by Taliban guerrillas and other anti-democratic forces, but who never expected the candidates to cast doubt on the process.

There were numerous scattered incidents of violence and anti-election plots reported during the day, but most were in remote provinces. An unprecedented deployment of nearly 100,000 Afghan and foreign security forces sealed off all major roads and guarded most polling centers.

Police said they discovered a fuel tanker truck carrying land mines and explosives in the southern city of Kandahar and arrested three Pakistanis who were in the vehicle. They said the volatile cargo could have been detonated in the city. Interior Ministry officials said they found explosives and other dangerous items in cars throughout Kabul and arrested a group of Taliban members who were holding a clandestine meeting.

Most voters cast their ballots without difficulty and went home, unaware of the candidates' protest until long afterward. Many voters appeared to find the first-time experience confusing and a little intimidating, but election workers carefully and repeatedly explained the procedure, and Afghans of all ages seemed eager and proud to be taking part.

"This is something Afghans have wished for deeply, and for a long time," said Gulab Niakzai, 47, a colonel in the new national army who had just voted at a high school in Kargah, a district west of Kabul. His wife Shirin, dressed in tailored black, smiled at his side.

"We want a clean government and an honest, patriotic president," Niakzai said. "Every Afghan should think very carefully about this decision, because we are building a future for our children."

On a windy highway in Wardak province, south of the capital, a cluster of men and women in billowing blue veils trudged along with their children, heading toward a distant polling station. Rassool Dad, 25, a mason who recently brought his family back from a long exile in Iran, carried his 9-month-old son in his arms.

"We are going to elect our president," Dad said proudly. "We want to stop the warlords and the bloodshed. We heard that the Taliban might attack polling stations, but if we were afraid, we wouldn't come out of our houses."

Occasional problems with logistics and staffing at polling places, especially the complicated arrangements allowing women to vote separately, also seemed to be handled good-naturedly. In De Afghanan, a village in Wardak, a local Muslim cleric had offered his front parlor as a women's voting site, but several hours after the men's polling station opened, no female election workers had arrived from Kabul.

"We called the U.N. several times, but no one has come," said Mahmad Aziz, 60, the local election supervisor. Finally he designated a group of male elders to act as go-betweens so local women could vote without being seen.

"We want everyone to be able to vote freely," he said. "We took an oath that none of us would put pressure on anyone."

Around him, a long line of men squeezed into a dark stone classroom, clutching their voter registration cards. One election worker inked their thumbs and punched a hole in their cards. Another showed them the long ballot with 18 names and tiny photographs. After the voter emerged from a small booth covered in gingham cloth, another worker took each ballot and stuffed it into a white plastic box.

Most voters said they understood that their ballot was secret, and many were shy or cagey about expressing their preference after voting. But in many places, people said they planned to vote for Karzai, saying he was an honest man and had worked hard for the country.

Despite the careful procedures, opposition candidates said there was ample room for fraud, especially because so many voters' thumbs were not marked with indelible ink. They alleged that large numbers of people had voted several times and that government officials had pressured some to vote for Karzai.

"We have received reports of people voting 10 and 15 times," said Homayoun Shah Assefy, a lawyer and presidential candidate. "Under these conditions, elections have no meaning. We do not want a boycott, we want a postponement, and we want better supervision."

To some extent, the suspicion of multiple voting was exacerbated by the success of the voter registration drive. Initially, experts predicted 7 million to 8 million people would register, but the final number was more than 10.5 million. Critics said many people had registered several times, but international and Afghan officials said there was little that could be done about it.

Afghan men stand in line as they prepare to cast their votes at a polling station in Kandahar, the main southern city. An Afghan woman in a burqa casts her ballot in Kabul. Special arrangements were made for females to vote separately. In the village of Dehnow, an hour south of Kabul, a local election worker marks the thumb of a voter to show that he has voted. Complaints arose after election workers marked voters with regular ink instead of indelible ink.