Once the storm struck, it was more of a problem for Mr. Romney. It put him in the position of struggling to explain the skepticism he had expressed during the Republican primaries about a federal role in disaster relief. Even worse, the hurricane pushed him off the stage at a crucial time.

In Boston, Mr. Romney’s aides broke out in a chorus of groans as they watched on television as Gov. Chris Christie of New Jersey offered effusive praise of the president’s handling of the disaster. They viewed it as a self-serving act of disloyalty from a man whom they had expected to deploy that very weekend on Mr. Romney’s behalf. The praise of Mr. Obama from a Republican governor came at the same time Mr. Romney had been portraying Mr. Obama as partisan and polarizing.

The same week, the president’s campaign released an advertisement in which another Republican, Colin Powell, a former secretary of state, endorsed Mr. Obama. The ad, Mr. Obama’s aides said, produced a spike of support from independent voters. (Mr. Obama’s aides grabbed the clip from a television interview with Mr. Powell, deciding not to chance asking him for permission).

Mr. Romney was finding Ohio, a state central to his victory, a stubborn target, as Mr. Obama benefited from the auto industry rescue he championed and that Mr. Romney had opposed. The Romney campaign sought to undermine Mr. Obama with an advertisement misleadingly implying that Jeep was moving jobs from Ohio to China. By every measure, the ad backfired, drawing attacks by leaders of auto companies that employed many of the blue-collar voters that Mr. Romney was trying to reach.

The futility of that effort was apparent outside the sprawling Jeep assembly plant in Toledo, which had just had a $500 million renovation for production of a new line of vehicles, a project requiring 1,100 new workers.

“Everyone here knows someone who works at Jeep,” Jim Wessel, a supply representative making a sales visit. He said no one would believe the ad. Speaking of Mr. Obama’s efforts to rescue the auto industry, he said,“I can just tell you I’m glad he did it.”

Mr. Romney was running out of states. He made an impulsive run on Pennsylvania, chasing what his aides said were tightening polls there. Mr. Romney had spent little time or money there before roaring in during the campaign’s final hours.