For the past 10 days, Sen. John F. Kerry has traveled the country laying the foundation for a debate with President Bush over the conduct of U.S. foreign policy. In Kerry's framing, it is a choice between realism and romanticism, competence and ineffectiveness.

Neither of those arguments against Bush appeared promising at the beginning of this year -- nor is it evident that, given questions about his record and that of the Democratic Party, Kerry can prevail politically in a contest with the president on these questions.

That he is making them at all, however, is a testament to how dramatically perceptions of the president's Iraq policy -- and by implication his administration's foreign policy vision -- have changed.

This is a debate the architects of Bush's reelection bid claim to welcome, and they express confidence they will win it in the end. They assume that, despite setbacks in Iraq, voters in November will trust Bush over Kerry to guide the United States in the war on terrorism. But in the space of six months, events in Iraq have provided Kerry with an opening to challenge the administration on what long was seen as its strongest suit.

For one, the administration has been forced to rethink many of its basic assumptions about Iraq, from the prewar certitude about weapons of mass destruction to the openness with which U.S. forces would be welcomed to how quickly they could stabilize the country to their confidence about the creation of a truly democratic government in the heart of the Middle East.

Those miscalculations have raised questions about whether the administration built its policies on an idealized or ideological view of the world rather than on a hardheaded understanding of past and present realities.

At the same time, the president's national security team, among the most experienced ever assembled in a modern presidency, has contributed to Bush's problems.

Vice President Cheney has become a lightning rod for criticism, less popular today than when Bush became president. Defense Secretary Donald H. Rumsfeld is under fire for the prisoner abuse scandal and his treatment of the uniformed military at the Pentagon. CIA Director George J. Tenet is leaving with his agency's competence called into question over the failure to find weapons of mass destruction in Iraq. Secretary of State Colin L. Powell has battled perceptions that he is an outsider inside the administration.

Kerry stepped into that opening by delivering three major speeches on foreign policy in the past 10 days. His advisers said his goal was less to provide a detailed critique of Bush's policies than to demonstrate, at a time when national security looms as a bigger issue in this campaign than at any time since the end of the Cold War, that he has his own vision and the credibility and experience to implement it.

Politically, say other Democrats, Kerry's objective is to neutralize national security policy, not necessarily to win the argument outright. "We [Kerry] won't win [the election] on national security issues, but we could lose," said Sen. Evan Bayh (D-Ind.). "He has to cross the threshold of credibility on security -- and then he can win on the economy and health care."

In his speeches, the Massachusetts Democrat stopped short of directly questioning many of the broad goals of the administration in the war on terrorism, but he sharply questioned the means the administration has used to achieve those goals.

"They looked to force before exhausting diplomacy," Kerry said in Seattle on May 27. "They bullied when they should have persuaded. They have gone it alone when they should have assembled a team. They have hoped for the best when they should have prepared for the worst. In short, they have undermined the legacy of generations of American leadership. And that is what we must restore."

Like Bush, Kerry has focused on the need to destroy such terrorist networks as al Qaeda. In a commencement speech at the Air Force Academy this past Wednesday, Bush described the war on terrorism as "the great challenge of our time, the storm in which we fly."

But in a speech the next day at the Harry S. Truman Library in Independence, Mo., Kerry said that, by going to war against Iraq, Bush lost focus on that larger battle and alienated much of the world at the same time. "From day one, this administration has been obsessed with threats from other states -- instead of opening their eyes to the perils of the new century."

James P. Rubin, State Department spokesman in the Clinton administration and now a foreign policy adviser to Kerry, said the Bush administration has acted on the assumption that if it did the right thing, alone initially, the rest of the world eventually would go along -- an approach that he called a failure.

"They believed that if they were successful, the rest of the world would have come running to join us," he said. "It was a high-stakes gamble, and the gamble did not work. . . . The idea that America's power means we can do everything alone has been discredited by Iraq." Kerry, he added, would bring "a new realism" to the pursuit of many of the same goals Bush has outlined.

Implicit in Kerry's speeches is the idea that Bush has been blinded by ideology, and Kerry has shied away from elevating the creation of democracy in the Middle East in his foreign policy. In that sense, Kerry seemingly is trying to turn the tables on Bush and the Republicans, talking about strength and realism and using his service in the Vietnam War to suggest that he represents a break from a Democratic Party often seen in the past as reluctant to use force.

Whether Kerry can prevail in this debate is an open question. Republican say that a few well-crafted speeches cannot wipe away his record, arguing that he has not been a vigorous advocate of a strong defense or intervention in the past. Among other things, they point to his vote against the $87 billion authorization for Iraq and Afghanistan last fall.

Kerry has been bedeviled by Iraq from the beginning of his campaign. He has tried to square his 2002 vote authorizing Bush to go to war, unilaterally if necessary, with his strong reservations about the war. He also has been pressed to explain why he opposed the 1991 resolution authorizing the Persian Gulf War, even though Bush's father had assembled the kind of international coalition then that Kerry says he would like to have seen in this war.

In his speeches, he accused Bush of going to war the wrong way in Iraq but stopped short of saying the war was wrong. And events have pushed Bush in the direction of relying more on the United Nations, leaving less space between the two candidates.

Kerry is counting on disenchantment with Bush's foreign policy management to bring voters in his direction, and his advisers believe that, over time, more and Americans will be willing to trust him as commander in chief. His speeches have set the stage for what will be one of the most important arguments of the 2004 election, but they have not answered all the questions he will face before November.