The departure of John Bolton as national security adviser last week — President Donald Trump said he fired him, and Bolton maintained that he quit — was logical and overdue. A rigid ideologue, Bolton has a long record of championing military action against U.S. adversaries, which Trump resists, and opposing negotiation with the likes of North Korea and Iran, which is the president's natural instinct.

He didn't alter those views to suit Trump, and instead battled those who catered to the president's wishes — most notably, Secretary of State Mike Pompeo.

Yet Bolton, who served in previous Republican administrations, can hardly be blamed for the falling-out. His ultra-hawkish views and habit of bureaucratic infighting were well known, even notorious, in Washington when Trump hired him in April of last year. But the president, in the hunt for his third national security adviser in just 15 months, simply disregarded the facts. Apparently Bolton was picked because Trump had enjoyed watching him on television. The result was to compound the chaos that has characterized the administration's foreign policy and left Trump without meaningful accomplishments.

Perversely, considering how out of sync he was with Trump's priorities, Bolton managed to accomplish a fair amount — if mostly in a negative sense. Last week he helped persuade Trump to torpedo an agreement with the Afghan Taliban, painstakingly negotiated by the State Department over the course of nearly a year, just before it was to be signed.

Earlier this year, he induced the president to set aside the department's work on a possible interim deal with North Korea on its nuclear program and instead demand that dictator Kim Jong Un immediately commit to giving up all weapons of mass destruction. That helped to precipitate the collapse of the Trump-Kim summit in Hanoi and has led to a prolonged lapse in negotiations, during which North Korea has been testing new missiles.

The national security adviser's principal responsibility has traditionally been to oversee a disciplined policymaking process that includes the State Department, the Pentagon and intelligence agencies, and to tee up big decisions for the president. Bolton didn't do that. Instead, he sniped at initiatives undertaken by others, like the North Korea talks and Afghan negotiations, and pursued long-standing pet causes of his own — such as his pointless crusade against the International Criminal Court. He championed an attempted coup against Venezuelan President Nicolas Maduro, which fell flat.

This dysfunction was, of course, enabled and even encouraged by Trump, who has shown no interest in orderly process.

FROM AN EDITORIAL IN THE WASHINGTON POST