It has been exactly 15 years since the start of one of the most fateful episodes of the early 21st century: the Iraq War. After the attacks of Sept. 11, 2001, the French newspaper Le Monde famously declared, “Nous sommes tous Americains” (“We are all Americans”) and even predicted that Russia would become America’s main ally. But U.S. President George W. Bush’s invasion of Iraq in March 2003 blew that prospect to smithereens.

We now know that the war, in addition to causing many of the region’s current troubles, marked the beginning of the end of America’s post-Cold War hegemony. We also know that, though it was sold as part of the “war on terror,” the groundwork for the invasion had been laid well before 9/11.

As early as 1998, the neoconservative Project for a New American Century sent a letter to then-President Bill Clinton urging him to topple Saddam Hussein. And after winning the presidency in 2000, Bush declared Iraq one of his top two security priorities. Not coincidentally, Bush’s administration included 10 of the 25 signatories of the PNAC founding statement, including Vice President Dick Cheney and Defense Secretary Donald Rumsfeld.

Soon enough, the Bush administration became obsessed with promoting the idea that Iraq had weapons of mass destruction, despite the absence of any conclusive evidence. In September 2002, Rumsfeld received a now-declassified intelligence report stating that “we don’t know with any precision how much we don’t know” about the “status of WMD programs” in Iraq. It made no difference.

In all likelihood, the Middle East would have been spared a great deal of suffering had the U.S. acted with more caution and rigor, as Hans Blix – the head of the U.N. Monitoring, Verification, and Inspection Commission – had advised. In May 2003, while aboard the aircraft carrier USS Abraham Lincoln, Bush delivered a speech in front of a banner declaring “Mission Accomplished.” But if the mission was to free Iraq from terror, reconstruct the country, and enhance security on all levels, it was an absolute failure.

It is generally agreed that the war in Iraq caused many more problems than it resolved. Prominent U.S. politicians who supported the 2003 invasion – including many Republicans – now admit that it was a mistake, as do the majority of Americans.

But, while the 2003 invasion was a profoundly misguided policy, both in form and in substance, the chaos that consumed Iraq and the rest of the region stem also from mistakes made by U.S. policymakers after Saddam had been removed from power.

Above all, there was the Bush administration’s “de-Baathification” policy, which sought to eliminate every vestige of Saddam’s neo-Baathist regime. Iraq is a Shiite-majority country, but Saddam’s political apparatus was dominated by Sunnis, many of whom had acquired deep religious convictions during a period of Islamization in the 1990s. After being excluded from the reconstruction process, many Sunnis turned to militant sectarianism.

De-Baathification also led to the dismantling of the Iraqi army. Thousands of military personnel, suddenly deprived of income and status, found new hope in the incipient Salafist Sunni insurgency, led by Al-Qaeda in Iraq, the precursor to Daesh (ISIS). The insurgents opposed not just the U.S. occupation, but also its perceived beneficiaries: mainly the Shiite majority.

Some ex-Baathists ended up in U.S. detention centers, where abusive practices were widespread. While interned in centers like Camp Bucca in Southeastern Iraq, ex-Baathists and Salafists commingled and the military experience of the former fused with the ideological extremism of the latter. By the time Daesh proclaimed its “caliphate” in 2014, an estimated 17 of its 25 principal commanders – including the group’s leader, Abu Bakr al-Baghdadi – had spent time in U.S. detention centers between 2004 and 2011.

Meanwhile, sectarianism was creating havoc in Iraq’s Shiite-led government. In 2010, the incumbent prime minister, Nouri al-Maliki, was re-elected, though his State of Law Coalition had won fewer seats than the more moderate Iraqi National Movement, led by Ayad Allawi. Barack Obama’s administration could have weighed in to help Allawi form a government, but chose to remain on the sidelines, allowing Maliki – Iran’s preferred choice – to hold onto power. Maliki’s policies became increasingly personalistic, clientelistic, and polarizing, fueling Salafi extremism, which had sustained several blows prior to the 2010 election.

The Obama administration’s refusal to back Allawi was a precursor to its premature withdrawal from Iraq at the end of 2011. Both decisions cleared the way for the insurgency that was already moving into neighboring Syria. Less than three years later, the U.S. was forced to return to Iraq; soon thereafter, it also launched an intervention in Syria.

Now, after a long and arduous campaign, Daesh has lost most of the territory it once held in Syria and Iraq. But the past 15 years have demonstrated that we cannot be complacent. Depriving Daesh of its territory does not eliminate the ideology that sustains it. In fact, it might radicalize it even further.

Looking ahead, the hope is that Iraq’s general electiond in May will deliver a government that is committed to ruling through consensus, maintaining stability and defending the country’s institutions. Moreover, the next government will have to reach out to Iraq’s independence-minded Kurds and find a satisfactory way to integrate them into the political process.

For the U.S. in particular, one of the most important lessons of the past 15 years is that military interventions aimed at regime change will almost always lead to disaster, especially in the absence of a sensible plan for what comes next. The Iraq War showed that the cost of unilaterally forsaking diplomatic channels can be enormous.

One hopes that the Trump administration – particularly the incoming secretary of state, Mike Pompeo – will heed these lessons as tensions with Iran heat up. Iran’s growing regional influence owes much to America’s mistakes in Iraq, starting with the abandonment of diplomacy. A similar U.S. approach to Iran would lead to another generation – or more – of turmoil in the Middle East.