In 2003, President George W. Bush and Paul Wolfowitz, the deputy defense secretary, used the attacks on Sept. 11, 2001, to wage preemptive war against Saddam Hussein and a nuclear arsenal that did not exist. They promised a “free and peaceful Iraq” that would be a model of democracy and stability in the Arab world.

Iraq is a reminder of the need for political leaders to ask the right questions before allowing military action and to listen honestly rather than acting on ideological or political impulses. Bush led the war, but Democrats as well as Republicans in Congress endorsed it. Iraq also shows the limits of America’s influence in regions where sectarian enmity remains strong and where democracy has no real history.

That experience is informing American policy judgments more generally. It has affected decisions about Syria, where President Obama has been right to move cautiously. For a long time the Syrian opposition was divided, and it was hard to know which group, if any, deserved help.

But with the Syrian conflict in its third year, the fighting has already spilled over the borders, destabilizing its neighbors, even as Al-Qaida-affiliated rebels play a bigger role. The reasons for opposing direct American involvement in Syria remain strong, but the United States needs to calibrate its policies continually and should not allow the Iraq experience to paralyze its response to different circumstances.

The lessons of Iraq, however, seem to fade when it comes to Iran. Many of the conservatives who strongly supported the charge into Iraq are fanning calls for U. S. military action to prevent Iran from acquiring a nuclear weapon. Obama has also been threatening “all options” if negotiations to curb Iran’s ambitions are not successful, and many lawmakers seem ready to take action against Iran soon.

The Iraq war was unnecessary, costly and damaging on every level. It was based on faulty intelligence manipulated for ideological reasons. The terrible human and economic costs over the past 10 years show why that must never happen again.