His advisers said that combative edge was essential to blunt any progress Mr. McCain was making as he sought to encroach on Mr. Obama’s trademark message of change. Or perhaps it is in response to cries of alarm from Democrats who believe he is being too mild-mannered.

But Mr. Obama’s remarks are curiously reminiscent  right down to that mocking tone  to words he spoke nearly a year ago when Senator Hillary Rodham Clinton suddenly tried to swipe the mantle of change and Mr. Obama demonstrated a fight that many Democrats had doubted he could muster.

Mr. Obama has been in this place before: finding the proper temperature to aggressively critique  or attack  his rival without tarnishing his own image of trying to remain above traditional politics. As he enters the final eight weeks of the race, advisers said, the lessons from the Democratic primaries are alive in his head.

Mr. McCain and his running mate, Ms. Palin, seem to be there, too.

“A month ago, they were all saying, ‘Oh, it’s experience, experience, experience,’ ” Mr. Obama said, speaking over booming applause the other night in a high school gymnasium. “Then they chose Palin and they started talking about change, change, change. What happened? What happened? What happened?”

For one of the few times in his presidential candidacy, Mr. Obama is suddenly not the freshest and most telegenic figure on the ballot. While he seems to have settled on a line of attack against Mr. McCain, his campaign appearances in the past 12 days make clear that he is still grappling with his approach to Ms. Palin.

He has declared her family off limits. He has praised her biography, telling an audience, “Mother, governor, moose shooter  that’s cool.” But he has taken sharp aim at her record as Alaska governor, vigorously questioning her evolving stance on the state’s so-called bridge to nowhere.

“She was for it until everybody started raising a fuss about it and she started running for governor and then suddenly she was against it,” Mr. Obama said, speaking over an applauding crowd in Michigan. “I mean, you can’t just make stuff up. You can’t just recreate yourself. You can’t just reinvent yourself. The American people aren’t stupid.”