HANOVER, N.H.—Presidential challenger Mitt Romney accused President Barack Obama of failing to lead in a time of economic peril but sounded less conservative than his Republican rivals in their debate Tuesday night, defending the 2008-2009 Wall Street bailout and declaring he could work with "good" Democrats.

Romney also gave one of his most spirited defenses of his health care initiative when he was Massachusetts governor, legislation that Obama has called a partial blueprint for his own national overhaul. By positioning himself closer to the political center on several points, Romney sought to underscore his claim that he can draw crucial independent voters in next year's general election.

His chief rival, Texas Gov. Rick Perry, seemed less sure-footed. He repeated his main talking points about free enterprise but did little to dent Romney.

Former pizza company executive Herman Cain, who has climbed in polls lately, got more air time than usual. He repeatedly touted his call for replacing the U.S. tax code with a 9 percent national sales tax and a 9 percent levy on personal and corporate income.

Meanwhile Tuesday, Obama defended his economic policies and criticized his Republican foes in a visit to the general election battleground of Pennsylvania.

And, hours before the candidates met in Hanover, Romney picked up New Jersey Gov. Chris Christie's endorsement. Romney hopes it will help cement his support among the GOP establishment and nurture an image that he's the party's inevitable nominee.

Romney seemed happy to play the part of front-runner in the nearly two-hour debate, sponsored by Bloomberg News and The Washington Post. He joked breezily with the moderators, chided Perry for interrupting him and ignored the Texan when quizzing other contenders.

Romney's strategy might carry some risks in a Republican primary process that's dominated by staunch conservatives, especially in the early voting states of Iowa and South Carolina. The Wall Street bailout is a sore point with many such voters.

But Romney seemed to sail through the debate largely unscathed, with Cain and Perry scoring few direct hits. The sharpest criticism of his bailout remarks came from former Sen. Rick Santorum, who lags in the polls.

Romney said no one likes the idea of bailing out big Wall Street firms. However, he said, many of the actions taken in 2008 and 2009 were needed to keep the dollar's value from plummeting and "to make sure that we didn't all lose our jobs." The nation was on a precipice, Romney said, "and we could have had a complete meltdown."

Romney, however, said he disagreed with Obama's actions to shore up General Motors and Chrysler. The administration says the moves were highly successful and much of the federal money has been repaid.