A month after the ballot was held, preliminary results for the Afghan presidential election are in. According to that tally — and to the surprise of no one — incumbent President Hamid Karzai has won. With more than 50 percent of the votes counted, his margin of victory allows him to skip a runoff against the top challenger, Mr. Abdullah Abdullah.

But reports of fraud throughout the country raise questions about the legitimacy of the results. Failure to respond to those charges and allay doubts will not only taint the results but also undermine international efforts to stabilize Afghanistan. No country will make sacrifices for an illegitimate government.

Afghanistan held the second democratic election in its history on Aug. 20. While the election did not match the heady atmosphere of the first ballot — when Afghans lined up for hours and defied the Taliban to cast votes — millions still turned out to exercise their right and thus profess their faith in democracy. But five years of violence and inefficiency have taken their toll: Turnout was only 38.7 percent, a little more than half the 70 percent who voted in October 2004.

The preliminary results are the same as they were five years ago. The Afghan election commission has concluded that Mr. Karzai won the election with 54.6 percent of the vote, a large enough margin to avoid a runoff against Mr. Abdullah, who received only 27.8 percent of the ballots cast. That result might not be final, though. A commission is looking into charges of fraud and ballot-box stuffing. In some cases, either 100 percent of the votes are for Mr. Karzai or the number of ballots bears no resemblance to the number of people seen during the election or who registered to vote. The commission has started carrying out a partial recount of about 10 percent of the vote. An independent European Union monitoring team has said that as many as 1.5 million of 5.6 million ballots cast may be suspect.

EU suspicions are matched by those of a U.N.-sponsored Electoral Complaints Commission, which is investigating fraud complaints at over 2,500 polling places. While there is no chance that the charges will change the standings of the candidates, they could result in the invalidation of enough ballots to drop Mr. Karzai's margin below 50 percent and force a runoff.

This presents two possible scenarios, both problematic. The first is if the results stand: Mr. Karzai is re-elected and the new government is installed with a cloud over its legitimacy. Afghanistan depends on foreign support for both security and the funds needed to run the country. Already, domestic debates are intensifying in countries that provide critical assistance, such as the United States and Germany. It will be even harder for them to continue their aid if the government in Kabul is seen as corrupt or illegitimate. The process echoes Vietnam.

The other scenario would see the process prolonged, perhaps greatly. Pakistan is already adrift. The election was held a month ago and this month's results are only preliminary. There are fears that a recount and a runoff would leave the country in limbo for months more. By the time the recount is complete it would be winter, with many districts inaccessible. New elections might have to be put off until spring. That could lead to rising levels of civil unrest and provide the Taliban with even greater opportunity to extend its already substantial influence in Afghanistan.

The difficulties posed by this situation became apparent when the No. 2 official of the U.N. group abruptly left the country following a disagreement with the mission director. Mr. Peter Galbraith, an American, reportedly believed that fraud had been perpetrated on a scale too large to ignore. His boss, Mr. Kay Eide, reportedly argued that stability was more important and that fraud charges would undermine the government. Mr. Eide, like many others, believed that Mr. Karzai would win the election regardless and that any election "irregularities" would eventually be sorted out.

It is a seductive argument and may be factually correct. But that logic is unlikely to motivate donors and other supporters of the Kabul government. Billions of dollars have already been spent in Afghanistan. Foreign militaries are suffering a growing number of casualties: Nearly 350 Western soldiers have died in Afghanistan this year, a 17 percent increase over 2008. The U.S. has nearly doubled its number of troops in Afghanistan to 62,000, and another 6,000 are expected by yearend. Those deployments will be harder, if not impossible, to defend if there is a sense that the government they are protecting is not legitimate.

Japan shares those concerns. Tokyo has been instrumental in pushing for aid for Afghanistan. Debate over how Japan can further help Afghanistan with nation building will be contentious in the aftermath of this election. No foreign government would support a local administration that does not command the loyalty of the majority of its people. Mr. Karzai must recognize the precipice he is approaching and take steps to avoid it. Time is running out.