THE PRESIDENTIAL campaign debate on Iraq grew considerably sharper -- and clearer -- over the past week. President Bush and visiting Iraqi Prime Minister Ayad Allawi made the case that Iraq is "a central front in the war on terror" and depicted a country that is steadily progressing toward elections and stability, despite what Mr. Bush calls "tough times." Meanwhile, Sen. John F. Kerry adopted, at last, a mostly coherent position on the war, one that describes Iraq as a "profound diversion" from the fight against terrorism and "a mess" that has made the United States less secure. The two candidates differ least on the most immediate question, which is what the United States now should be doing in Iraq. And yet the long-term goals they articulate also are different in subtle but significant ways.

The most substantive part of this debate, it seems to us, concerns the Bush administration's performance in Iraq over the past 18 months. Mr. Allawi spoke powerfully of what Iraqis have gained from the removal of Saddam Hussein, and we don't accept Mr. Kerry's assertion that America is "less secure and weaker in the war on terrorism" than it was when that murderous regime was still in power. In fact, we recall applauding when Mr. Kerry denounced Howard Dean for making the same claim. Still, Mr. Kerry's indictment of the Bush administration's execution of the invasion and occupation of Iraq is powerful and mostly irrefutable. As the senator put it in his speech at New York University, "this policy has been plagued by a lack of planning, by an absence of candor, arrogance and outright incompetence. And the president has held no one accountable, including himself."

Mr. Kerry's grim description of the "chaos" in Iraq is also more accurate than Mr. Bush's account of "months of steady progress." While there have been political and military gains, Mr. Bush's unrealistic depiction of the "few people" who are trying to disrupt the stabilization of the country is worrisome, since it seems to ignore the formidable resistance forces that U.S. commanders now face. So are his dogged assertions that elections will be held in January, since they come unaccompanied by any explanation of how the serious obstacles to them will be overcome. Both Mr. Bush and Mr. Kerry call for the rapid training of Iraqi security forces and speeding of reconstruction projects. But the crucial context is the Bush administration's record of incompetence: Only a tiny fraction of the reconstruction money appropriated by Congress nearly a year ago has been spent in Iraq, while only a few thousand Iraqi soldiers have been fully trained and equipped. While it seems unlikely that Mr. Kerry will succeed in enlisting major new foreign contributions of troops and aid to Iraq, the Bush administration no longer seems even to be trying very hard.

Beyond the immediate situation lies the candidates' more philosophical differences over how Iraq fits into the war on terrorism and what that war is about. Here Mr. Kerry has separated himself from Mr. Bush by embracing several positions we find troubling -- and that depart from previous stands. In describing the Iraq invasion as an unnecessary "diversion," Mr. Kerry has narrowed his definition of the war to the fight against al Qaeda and its related networks, while playing down the related problems of state sponsorship. Yet before the war, he said that Saddam Hussein had to be faced because of the danger that he would collaborate with terrorists or supply them with deadly weapons -- a position we continue to agree with.

Mr. Kerry recognizes that Iraq now has become "a haven for terrorists" and that consequently "we cannot afford to throw up our hands [and] see Iraq become a permanent source of terror." But his stated goals for Iraq are focused on the withdrawal of American troops, not the defeat of this threat. We believe Mr. Bush is right to insist on a broader struggle against terrorism, one that explicitly includes the political transformation of the Middle East. And he is better at setting goals for Iraq. U.S. troops, he says, will finish the mission "so that Iraq is stable and self-governing." Retreat, he correctly points out, would mean disaster for the United States as well as for Iraq.

Mr. Kerry has given a clearer choice to those Americans who oppose the Iraq intervention, and he has prodded Mr. Bush into a more forceful commitment to seeing it through. That polarization will suit many on both sides. But for those of us in the center -- who supported the invasion, as we did, but have been dismayed by the Bush administration's performance; or who doubted the wisdom of the war, but now believe it essential that the United States not be driven out of Iraq by insurgents and terrorists -- the choice has become more difficult.