There is good news from Afghanistan: The parliament recently passed, and President Hamid Karzai signed, a much-improved election law that preserves the existence of an independent electoral complaints commission. And Karzai signed into law another measure, approved by parliament several weeks ago, outlining how the vote will be held.

Many have feared that next year’s election would be held under deeply flawed presidential decrees. The election will be the most important Afghan political development of 2014 — and an inclusive and accountable election process needs active support now from the United States and NATO. The April election, which could be the first peaceful transfer of power in the history of Afghanistan, will be a major bellwether of success, or failure, in the United States’ longest war. A reasonably successful election could help Afghanistan pull together for the difficult years after most U.S. and international troops are withdrawn in 2014. A disputed election, however, could lead to ethnic and tribal fighting; a corrupt election would be a death knell for U.S. and foreign support for Afghanistan.

The most decisive factors are in Afghan hands: Will there be massive ballot fraud, as happened in 2009? Will fraud be violently challenged? The majority Pashtun population lives in the most violent areas; will it be afraid to vote? If so, the Pashtuns are likely to regard the outcome as illegitimate. Afghan politicians may fail to come together and have so many feuding candidates that decisive results will be difficult — which could lead to violence.

In Kabul, political energy is absorbed with pre-election bargaining, co-optation deals and a search for a “consensus” candidate. One of the first to declare his candidacy is Abdul Rasul Sayyaf, a Wahhabi scholar and a Pashtun warlord accused of severe human rights abuses. He is also a former speaker of parliament who several times has taken moderate positions and soothed potential crises. His contradictions — major human rights violator or potentially responsible politician? — are emblematic of Afghan politics and, perhaps, of outsiders’ inability to predict how any potential leader would govern. This also suggests why the United States should not try to support a candidate of its liking or otherwise pick favorites even as it must strongly emphasize the need to improve Afghan governance.

While the United States cannot guarantee an outcome, officials can take steps to promote broadly legitimate elections. The U.S. Embassy and the U.S. Agency for International Development are working with Afghan electoral bodies on procedural and technical matters. These actions are not well known to Afghans or foreigners; extensive and continuing publicity would emphasize our commitment to a successful election.

Enhanced security in eastern and southern Afghanistan is essential. Pakistan should be pressed to commit to moving heavy troop reinforcements to the Afghan border around the time of the election to diminish infiltration, as it did during Afghanistan’s 2004 presidential and 2005 parliamentary elections. NATO and the United States should coordinate a high-profile approach to this effort.

The U.S. should also plan limited troop reinforcements around the election. U.S. troops are to be out of the combat mission by then, but a short-term increase of ground and air support, particularly helicopters, would add to the Afghan military’s ability to maintain security. The U.S. troop withdrawal should not be run so much on autopilot that the defining political transition and the legitimacy of a democratic process our country has sacrificed so much to foster are undercut.

The U.S. should also support fielding international election observers, a request that the Afghan election commission, senior government officials and opposition politicians have all made. Security conditions will limit where observers can go. But with proper planning by international and Afghan security officials, observers could be present in all major population centers. Planning and early political work in coordination with other NATO governments are needed.

The extensive civilian U.S. Embassy staff should reinforce nongovernmental observers. Embassy staff who served in the provinces and have provincial ties to understand local political dynamics would provide analytical insight far greater than their numbers. Washington’s political fears of casualties post-Benghazi cannot be allowed to render us ignorant of what goes on in Afghanistan outside Kabul.

The Afghan election seems distant amid our domestic politics and crises in the Middle East. Yet it will have a major impact on what becomes of 12 years of U.S. sacrifice and expenditure.

Publicity, coordination on Pakistan, limited troop reinforcements and fielding election observers would significantly increase the chances for a positive result.

All of these measures will require time for decision-making, organization and implementation.

We need to get to work.

Ronald E. Neumann was the U.S. ambassador to Afghanistan from 2005 to 2007 and is the author of “The Other War: Winning and Losing in Afghanistan.” Vanda Felbab-Brown, a senior fellow at the Brookings Institution, is the author of “Aspiration and Ambivalence: Strategies and Realities of Counterinsurgency and State-Building in Afghanistan.” This column was written for The Washington Post.