An enormous spike in the number of Haitian migrants crossing into the United States from Mexico over the past year prompted President Obama’s administration last month to order a sudden policy reversal and served as a reminder of the dysfunction and despair driving people from the hemisphere’s poorest nation.

Better prospects in Haiti depend on political stability, which is at a make-or-break juncture. With a redo, scheduled Oct. 9, of last year’s failed, allegedly fraud-ridden presidential vote, Haiti has a chance to regain a measure of prosperity following years of mismanagement and suffering. It must seize that chance.

A devastating earthquake in 2010 led U.S. officials to adopt a lenient stance toward Haitian migrants without visas, who have been granted admission and temporary work permits on the grounds that conditions in Haiti were so dire. The administration abruptly reversed course last month after more than 5,000 Haitians, many of whom had undertaken an odyssey through South and Central America, were processed through the San Ysidro Port of Entry near San Diego since last October. Just 339 Haitians crossed there in all of fiscal 2015.

The stated rationale of U.S. officials was that conditions in Haiti had improved. That’s a stretch. While most of the 1.5 million people displaced by the earthquake have been resettled, economic growth is all but nonexistent. Investment is sluggish, and a drought has contributed to food shortages.

In fact, the administration could ill afford another migrant crisis; hence the change in policy on Haitian migrants. For a more durable solution, what is needed as a first step is a fair and transparent election in Haiti, whose political history offers few such examples.