Just a day after the U.S. reached a new agreement on migration with El Salvador, Guatemala and Honduras, President Donald Trump announced he was cutting off their aid. At a stroke he has thrown the State Department into chaos, and, more important, made it more likely that caravans of Central American migrants will keep heading north.

Migrant smugglers have taken advantage of a broken, backlogged asylum system that creates perverse incentives to apply. Ending U.S. aid to El Salvador, Guatemala and Honduras will not solve that problem. But it will certainly damage the organizations that distribute the aid, and will worsen the plight of their desperate clients.

Since desperation drives migration, this is directly counterproductive. Moreover, some of the U.S. assistance helps pay for security. Halting aid will undermine efforts to combat the smuggling of drugs and people.

Trump is right to press Mexico to better control its southern border. But the best approach to security cooperation with El Salvador, Guatemala and Honduras would be to step up support for investigations into bribery, money-­laundering, theft, and complicity of corrupt officials in drug and migrant smuggling.

The long-term answer to out-­migration is opportunity and prosperity at home. Nonetheless, well-designed assistance can help.

The president should reverse his decision.

FROM AN EDITORIAL ON BLOOMBERG OPINION