The final debate of campaign 2012 may end up changing few minds, but it was a revealing moment that said plenty about the current state of the race for the White House. President Obama, who has seen his September lead erode, tried to rattle and disqualify his challenger. Mitt Romney, whose advisers express growing confidence about his chances of winning in November, played not to lose the debate in the hope of winning the election.

Monday’s debate produced a role reversal. If Romney was the aggressor in Denver, Obama assumed that posture in Boca Raton. If Obama was listless in the first debate, Romney was cautious and sometimes tentative in the last. Obama showed greater confidence in his command of the subject matter, but Romney sought to reassure voters that he would be steady and strong as commander in chief.

Instant polls produced a predictable result: a narrow Obama victory, according to CNN, but with Romney passing the commander-in-chief test in the eyes of those who watched. The reactions offered real-time confirmation that most voters are locked into their choices and are not likely to be swayed by a few exchanges between the candidates, however effective their arguments.

In three debates, Romney offered three styles: confidently assertive in the first debate; aggressive and sometimes petulant in the second; restrained and careful in the third. He appeared to have two goals: to offer a broad critique of the president’s leadership on foreign policy while avoiding any hint of impetuousness or warlike tendencies. The last thing he wanted to suggest was that he was in the pocket of the neocons in his party.

Time and again, he put military action at the bottom of the list of options for dealing with the world’s crises. He said he did not favor direct military intervention in Syria. Praising the president for the killing of Osama bin Laden, he said, “We can’t kill our way out” of the rising turmoil across the Middle East.

Obama tried to goad him, perhaps mindful that, when Romney has been challenged by opponents in debates, he has often responded too aggressively. Romney was on guard Monday night after a performance at the second debate at Long Island’s Hofstra University in which he was judged even by supporters to be too hot.

When the president upbraided his challenger over the decline in the number of ships in the naval arsenal by noting that there were also fewer horses and bayonets in use than in the early-20th century, Romney didn’t take the bait. When the president contrasted his trip to the Middle East as a candidate in 2008 with Romney’s trip last summer, noting, for example, that he hadn’t gone to Israel to raise money from wealthy donors, Romney didn’t respond.

Before the debate, some Republicans — among them Sen. Lindsey O. Graham of South Carolina — were hoping Romney would make an even more aggressive case against the president on what Graham said was the rapidly deteriorating situation in Iraq, the continuing threats from al-Qaeda and other issues.

Onstage at Lynn University, Romney did not adopt that strategy. Rather than making a stronger case for troops remaining in Iraq, he tried to suggest that he was only favoring what he said the administration had sought but failed to achieve from the Iraqi government to keep a residual force there.

All of this raised questions about Romney in the same way as in the first debate. Democratic Sen. John F. Kerry of Massachusetts, who played Romney in Obama’s mock debates, accused the GOP nominee Tuesday morning on CNN of “hiding” his true positions on foreign policy.

In Denver, the candidate who once claimed he had been a “severely conservative” governor came across more as the moderate known to his Massachusetts constituents during his one term in office there. In Boca Raton, he put aside the sharpness of his criticism of the president that had marked his most recent foreign policy addresses, leveling his critique of the president in more modulated language.

Both Romney and Obama appeared eager to turn away from foreign policy, the subject of the final debate, to the economy and domestic policy, the issues of most concern to the voters. Whether viewers stayed as long with this debate as they did with the first or the second is an open question.

The president showed a command of the subject matter gleaned from occupying the Oval Office for almost four years. His familiarity contrasted with Romney, who, at times early in the debate, seemed to be echoing briefing books rather than experience. But that is almost always the case in a debate pitting an incumbent against a challenger.

The president’s goal was to paint his rival as unsteady, inconsistent and, therefore, unreliable. Romney’s goal was different. It was to reassure voters rather than to topple the president. On points, the debate went to the president. As a political moment in the campaign, the debate may have less effect than other two. The bottom line for Romney advisers was to turn Monday’s debate into as much of a nonevent as possible. But will that prove to be a winning strategy in two weeks?

Obama and Romney met at a time of rising fortunes for the challenger. Obama’s campaign advisers continued to say that the close race in which they find themselves was always expected, that the margins of September were destined to contract once October arrived. They still assert that Obama will win the race with what they claim is a superior ground operation and what they believe is a structural advantage in the Midwest.

Obama’s campaign worked hard during the summer to define Romney as a wealthy, out-of-touch businessman. Much of that disappeared during the first debate, thanks to the persona Romney projected and the doubts Obama raised about himself. The question now is whether there is a residue of that summer barrage against Romney that remains in states such as Ohio, which more and more appears as the linchpin of the entire election.

Romney advisers see a different dynamic, one they’ve talked about for a year: an election in which the challenger is at or near parity with the incumbent in the final weeks of the campaign. They believe that Romney has more room to grow than the president and that every day the race remains close, the greater Romney’s chances of winning. Every poll that shows Obama below 50 percent gives them cause to cheer.

After three debates, both nominees have unfinished business to attend to. Obama moved Tuesday to address one of the criticisms of his reelection campaign by releasing a booklet outlining second-term goals and policies. This has been a missing piece in his message all summer and fall. Romney’s challenge will be to show that his policies are aimed at all Americans, not primarily the rich. He cannot assume, despite the polls, that he has solved this problem. With two weeks to go, the candidates’ work is not over.