The pre-dawn assassination of Haitian President Jovenel Moïse puts one of the Western Hemisphere’s most impoverished countries at risk of anarchy. That poses an immediate humanitarian threat to millions of Haitians and an equally urgent diplomatic and security challenge to the United States and major international organizations. Swift and muscular intervention is needed.

Mr. Moïse took office in 2017 and has ruled by decree for the past year and a half, with most of parliament disbanded and his own toadies appointed as mayors to replace elected ones across the country. He was an autocrat who allowed or abetted the country’s descent into lawlessness, urban gang warfare, indiscriminate kidnapping and impunity. Even before unknown gunmen killed him at his home early Wednesday, opposition protests were intensifying, along with street violence, and there were amply justified fears that Haiti was on the brink of chaos. Already, thousands had fled the teeming capital, Port-au-Prince.

His death is likely to trigger a power vacuum that would only accelerate the spiral of mayhem in the absence of almost any current elected office-holders with a claim to political legitimacy. Even Interim Prime Minister Claude Joseph, himself in office just three months, was about to be replaced by an obscure neurosurgeon nominated by Mr. Moïse the day before he was killed. Simply put, there is no one with any real authority in position to run the country. And Mr. Joseph’s assertion on Wednesday that order will be maintained by Haiti’s police and army, who have proved impotent or complicit in the face of growing disorder, is anything but reassuring.

The country now needs elections to produce a government that would be seen as legitimate in the eyes of most Haitians. The hard truth, at this point, is that organizing them and ensuring security through a campaign and polling, with no one in charge, may be all but impossible. To prevent a meltdown that could have dire consequences, the United States and other influential parties — including France, Canada and the Organization of American States — should push for an international peacekeeping force, probably organized by the United Nations, that could provide the security necessary for presidential and parliamentary elections to go forward this year, as planned.

There is recent precedent for such a force — the United Nations Stabilization Mission in Haiti, whose blue-helmeted troops patrolled Haiti for 13 years before leaving in 2017. That mission, which involved forces from Brazil, Uruguay and other nations, was a far cry from perfect. U.N. troops from Nepal introduced a severe cholera epidemic in Haiti, and others fathered hundreds of babies born to impoverished local women and girls. There were credible allegations of rape and sexual abuse by troops.

The U.N. force did manage, however, to bring a modicum of stability to Haiti following the 2004 uprising that deposed President Jean-Bertrand Aristide. At this perilous moment, a modicum of stability would be preferable to most other plausible scenarios. Statements of concern are inadequate; Haiti has been the subject of too many of them, to no effect. The international community must act now.