Mr. Obama has sought in recent weeks to deal pre-emptively with issues that shadowed him in the primary and on which Mr. McCain has already challenged him. At a speech to Jewish leaders in Washington, he markedly toughened his statements about how he would deal with Iran after coming under attack for his pledge to meet with its leader; he now almost always wears an American flag pin on his lapel after Republicans sought to raise questions about his patriotism by pointing to the absence of one.

While the lengthy, contentious Democratic primary fight against Mrs. Clinton exposed vulnerabilities in Mr. Obama that the Republicans will no doubt seek to exploit, it also allowed him to build a nearly nationwide network of volunteers and professional organizers. While early assertions by presidential campaigns that they intend to expand the playing field are often little more than feints intended to force opponents to spend time and money defending states that they should have locked up, Mr. Obama’s fund-raising success gives his campaign more flexibility than most to play in more places.

Mr. Obama’s aides said some states where they intend to campaign  like Georgia, Missouri, Montana and North Carolina  might ultimately be too red to turn blue. But the result of making an effort there could force Mr. McCain to spend money or send him to campaign in what should be safe ground, rather than using those resources in states like Ohio.

Mr. Obama’s campaign manager, David Plouffe, said that the primary contest had left the campaign with strong get-out-the-vote operations in Republican states that were small enough that better-than-usual turnout could make a difference in the general election. Among those he pointed to was Alaska, which last voted for a Democrat in 1964.

“Do we have to win any of those to get to 270?” Mr. Plouffe said, referring to the number of electoral votes needed to win the election. “No. Do we have reason to think we can be competitive there? Yes. Do we have organizations in those states to be competitive? Yes. This is where the primary was really helpful to us now.”

Image Senator Barack Obama, with Representative Rahm Emanuel, made an unscheduled stop Friday at a Chicago 2016 Olympics rally. Credit... Charles Rex Arbogast/Associated Press

Mr. Plouffe also pointed to Oregon and Washington, states that have traditionally been competitive and where Mr. Obama defeated Mrs. Clinton, as places the campaign could have significant advantages .