Five years ago, President Obama hailed the military campaign in Libya that toppled Muammar Gadafhi as one of the foreign-policy triumphs of his presidency. Today he calls Libya his worst mistake. But though he may have changed his grade from an A to an F, his commitment to "leading from behind"  a euphemism for American passivity and abdication  hasn't budged.

On the day Gadafhi was killed in October 2011, Obama took a victory lap. "Our brave pilots have flown in Libya's skies, our sailors have provided support off Libya's shores, and our leadership at NATO has helped guide our coalition," he declared. "Without putting a single US service member on the ground, we achieved our objectives."

He was wrong. Libya soon imploded into chaos and violence. It became a terrorist badlands where more than 10,000 people have been murdered  including US Ambassador Christopher Stevens and three of his colleagues, killed by Islamists in Benghazi just 11 months after Obama's "mission-accomplished" moment in the Rose Garden.

The president acknowledges now that his policy in Libya ended in disaster. In a Fox News interview last week, he confessed his negligence in "failing to plan for the day after" the dictator was overthrown.

In other interviews, Obama has pinned the blame for the Libya debacle less on his own lack of preparation for a post-Gaddafhi transition than on Europe's failure to stay engaged. "When I go back and I ask myself what went wrong, there's room for criticism," he recently told The Atlantic's Jeffrey Goldberg, "because I had more faith in the Europeans, given Libya's proximity, being invested in the follow-up." But when the United States heads for the exits, its allies are apt to follow suit. And Obama, who had agreed only reluctantly to intervene in Libya in the first place, had no interest in sticking around.

It didn't take long for Libya to drop off the White House radar screen. "The inattention was not just neglect. It was policy," concluded The New York Times in a lengthy review of the Libyan fiasco earlier this year. The administration imposed "fierce limits" on any US role in Libya's metamorphosis  conditions so strict that America in effect washed its hands of responsibility for the country's fate. Not surprisingly, that fate has been ghastly.

It may seem astonishing that Obama, who so harshly condemned his predecessor's blunders in Iraq, would wind up repeating the gravest of those blunders in Libya  namely, not being ready for the instability and insurgency that would follow Western intervention. As military historian Max Boot remarks, by 2011 "it was not exactly a secret that bad things happen if the US and its allies overthrow a strongman without having a plan for what comes next."

But Obama is better at deploring other people's foreign-policy messes than at learning from them. The lesson he takes away from the Iraq war was that the United States has no business intervening militarily in the Middle East  and that the greater the intervention, the greater the resulting fiasco. The facts haven't borne out that conclusion. But Obama won't be budged.

When George W. Bush announced in January 2007 that he intended to "surge" additional troops to Iraq and implement a new counterinsurgency strategy, then-Senator Obama was scornful: "I am not persuaded that 20,000 additional troops in Iraq are going to solve the sectarian violence there," he said. "In fact, I think it will do the reverse." In the event, of course, Bush's surge proved a remarkable success. By the time Obama took office, Al Qaeda in Iraq was crippled, attacks were down 90 percent, and Iraq was being governed by democratically elected politicians. The new commander-in-chief was happy to take political credit for victory in Iraq, which Vice President Biden trumpeted early on as "one of the great achievements" of the Obama administration.

Yet none of that led Obama to question the wisdom of pulling all US forces out of Iraq, or to heed warnings that the swift disappearance of tens of thousands of American peacekeepers would leave a catastrophic vacuum that the region's deadliest forces would rush to exploit. Obama's determined disengagement wrecked what had so painstakingly been won in Iraq. Without America's restraining presence, Nouri al-Maliki's Shiite-dominated government grew ruthlessly authoritarian, Iran's influence intensified, and ISIS began its horrific reign of terror.

US Navy sailors captured by Iran were forced to kneel, hands on heads, in propaganda images broadcast by Tehran in January.

More "leading from behind" followed in Syria. Obama issued tough threats of chemical weapons "red lines" and demanded Bashar al-Assad resign, but the bristling words were never backed up with deeds. As America's credibility diminished, predictable consequences ensued: soaring death tolls, vast refugee floods, and the emboldening of anti-democratic regimes from Moscow to Beijing.

Yet even now, Obama cannot see that a doctrine premised on avoiding American involvement in the world's conflicts is bound to fail. A policy built around US disengagement only intensifies global disorder. The president concedes that he should have had a better "day-after" plan in Libya  but still maintains that the calamity his approach caused shows he was right all along.

In Goldberg's words, "Libya proved to [Obama] that the Middle East was best avoided." It reinforced his subsequent decision to do nothing about Syria. He has no regrets about abandoning his red line  he says now that he is "very proud" he decided not to stop Assad's horror show. To this day, Obama has not altered the mindset he started with: that American power cannot fix what ails the planet's bad neighborhoods, and is likely to make them worse.

But Obama's foreign-policy stewardship teaches a very different lesson. Since 2009, America's credibility has been badly eroded and the world has become far more dangerous and unstable. The price of American retreat has been terrible, made all the worse by a president too rigid to change his mind.