In less than a week, Iraq could be John Kerry's war. If the Democrats win on Nov. 2, the president-elect must immediately focus on what a U.S. military withdrawal from Iraq would mean for the Middle East and for the United States.

Until then Kerry will have had little time, or incentive, to conceive of failure in Iraq as anything other than a vote-attracting cudgel to swing at George W. Bush. If Kerry and his team have done much deep thinking on Iraq -- particularly on a comprehensive strategy that takes into account the possibility of U.S. failure there -- that thinking has not emerged in their campaign prescriptions.

Like Wagner's music, the absence of clear commitments at this stage may not be as bad -- or in this case as damaging -- as it sounds. The Democratic challenger is not handcuffed to specific actions in Iraq as he is on health care or on naming Supreme Court justices. Kerry has room to jettison implausible campaign promises as Iraqi and international realities assert themselves.

But he must quickly fill the policy vacuum that he will then have created. He and Bush must immediately engage in a transition that allows Kerry to deal with Iraq and the struggle against Islamist terrorist networks. And Kerry -- a process guy in the jargon of Washington -- must above all keep his eye on context in the time of transition.

It is the urgency of the post-election situation, not the certainty of a Kerry victory, that triggers these comments now. Democrats will quickly rediscover the dangers of answered prayers if Kerry wins a race that is deadlocked as I write. A change at the White House in wartime would produce a dislocation that needs to be anticipated and compensated for by Kerry.

Many of Kerry's supporters seem to dismiss his pledges to fight on in Iraq -- only better than Bush -- as campaign rhetoric that masks an intention to withdraw U.S. troops swiftly. Iraq is, in this view, to be written off as "Bush's war," a conflict begun on the basis of deliberate lies and undertaken for nefarious purposes that can now be abandoned.

Kerry has come close to making that case part of his campaign. But he adds that, having invaded Iraq, the United States cannot now cut and run. Defeat is not an option, he says in an echo of Bush's position.

But Kerry's repeated denunciations of Iraq as the wrong war in the wrong place at the wrong time weaken the moral and perhaps even the legal base for ordering Americans to continue to fight there if he becomes president. He will have to act quickly to clarify the whys and hows, as well as the shape, of continued U.S. involvement.

The "wrong war" statements not only will discourage countries such as France and Germany from providing the international troops promised by Kerry but will also subject present coalition members such as Poland and South Korea to intensified pressures at home to withdraw. By Inauguration Day, Kerry's international options may be shrinking, not expanding. (So may those of a reelected Bush.) The victor -- be it Bush or Kerry -- should drop the intellectual pretense that the United States cannot lose in Iraq. At some point in any war the damage done to a democratic society at home so exceeds the benefits that can be gained abroad that people say "enough." It happened in Vietnam, and it happened in Europe's colonial wars in Africa and Asia.

We are not at that point in Iraq. But America's strategic impatience with having to confront daily the cruelty and horror of the conflict there is on the rise and cannot be neglected. Only by contemplating and articulating in realistic detail the strategic consequences of a U.S. withdrawal under fire can the next president meet the challenge of that impatience.

Context is crucial. Israel's Ariel Sharon is committed to a unilateral withdrawal from Gaza next year. Would Sharon be able to sustain that decision if the United States were to leave Iraq in disorder? Would the radicals of the Arab world and Iran be emboldened by the two withdrawals? What would be the effect on oil prices and global energy policies? A Kerry who flees Iraq would in short order be forced to overturn U.S. foreign policy across the board in crisis conditions.

Not a good idea. So Kerry will be condemned to turn the wrong war right, thus making Iraq Kerry's war. Given his Vietnam experience, Kerry should be under no illusions about how difficult decent intervals are to achieve and how real the failure option actually can be.