Watch a replay of Saturday's ABC/WMUR Republican presidential debate at 8 p.m. ET on CNN.
Concord, New Hampshire (CNN) -- Front-runner Mitt Romney came under attack Sunday in the second Republican presidential debate in New Hampshire in two days, with rivals saying he would be unable to defeat President Barack Obama.
In heated exchanges with former House Speaker Newt Gingrich and former Pennsylvania Sen. Rick Santorum, Romney defended his record when he was governor in neighboring Massachusetts and said he is a consensus-builder who would be able to withstand the rigors of a "billion-dollar" campaign by the president.
The Sunday debate broadcast by NBC came two days before New Hampshire's first-in-the-nation primary, with Romney ahead in the polls and looking to launch a momentum-building run after his narrow victory in last week's Iowa caucuses.
Asked about Romney's electability in a race against Obama, Gingrich called him a product of a liberal-leaning Massachusetts political culture who would "have a very hard time getting elected."
He also accused Romney of speaking "pious baloney" by claiming he left politics in the 1990s to try other things.
"You've been running consistently for years and years and years," Gingrich said. "Just level with the American people."
Santorum, meanwhile, asked why did Romney "bail out" on the Massachusetts people by not running for re-election for governor, a comment that caused Romney to laugh out loud.
"We want someone when the time gets tough, and it will in this election, we want someone who will stand up for conservative principles," Santorum said.
Romney responded that New Hampshire voters can't be fooled about the record of a governor in the state next door, and said only someone with his experience in the business sector outside of Washington politics could defeat Obama.
While proclaiming that a career in politics "stinks," Romney also said he would fight for a second term if elected president when challenged on that point by Santorum.
Former Utah Gov. Jon Huntsman, meanwhile, went after Romney for comments at Saturday night's debate criticizing Huntsman's service as U.S. ambassador to China under Obama.
Huntsman said he was serving his country, whether a Democratic or Republican president, to which Romney responded by questioning how someone seeking to lead the Republican Party could have promoted the policies of the Obama administration.
"This nation is divided ... because of attitudes like that," Huntsman shot back, prompting applause.
Other candidates also faced criticism in the NBC News/Facebook debate on NBC's "Meet the Press" program.
Rep. Ron Paul of Texas, who has placed among the top three candidates in recent polls as well as in the Iowa caucuses, was asked about his legislative record, with shows only one of his bills passed during his more than 20 years in Congress.
"That demonstrates how out of touch the U.S. government and U.S. Congress is with the American people," Paul answered, arguing that his failed proposals represented legislation favored by the public but rejected by politicians.
Santorum followed by saying that Paul was incapable of working with others in the legislative process, calling him "out of the margins."
Texas Gov. Rick Perry sought to distinguish himself from his rivals, saying his calls for a balanced budget amendment, term limits and a part-time Congress went against the wishes of career Republican politicians.
"There's a bunch of people standing up here that say they're conservative, but their records don't follow up on that," said Perry, who maintains hope of becoming the conservative choice despite an inability to recover from a drop in support after weak performances in previous debates.
Santorum, who has come under fire for his right-wing views on social issues, said Sunday that opposing the agenda of gay rights activists on marriage and adoption doesn't mean he disrespects homosexuals.
"Just because you disagree with someone's desire to change the law doesn't mean you hate them or want to discriminate against them," he said. Asked what he would do if his son came out of the closet, Santorum prompted applause by responding: "I would love him as much as I did the second before he said it."
Romney, who is considered too moderate by many conservatives, tried to enhance his right-wing credentials by calling for limits to the "extraordinary political power of government unions," including steps to keep the pay and benefits of government union workers in line with private sector workers.
The candidates aimed some of their sharpest salvos at Obama and his administration.
Romney blamed the president for a "tepid" economic recovery, saying Obama has been "anti-investment" and "anti-jobs" by creating a hostile environment for business growth and investment.
Perry called Obama "a socialist" and said he disagreed with those who say the president "reflects our founding fathers."
Gingrich, meanwhile, called the Environmental Protection Agency "increasingly radical" and "increasingly imperialist," saying it is anti-business.
"This is an agency out of touch with reality that I believe is incorrigible," he said.
In the first weekend debate, Saturday night at St. Anselm College, Romney didn't field much incoming fire from his rivals, leaving them Sunday's showdown to try to damage his status.
Romney holds a large lead over his rivals in the latest polls in the Granite State. He also holds a double digit advantage over the rest of the Republican presidential candidates in a new CNN/Time/ORC International survey in South Carolina, which holds its primary on January 21.
On Saturday, the toughest moments for Romney came early, when he was questioned about his involvement in laying off workers at companies acquired by Bain Capital, a private equity firm he steered.
Santorum targeted Romney, who often touts his business and corporate experience as he makes his second bid for the White House, saying "business experience doesn't necessarily match up with being the commander in chief of this country. The commander in chief of this country isn't a CEO."
Romney defended himself, saying, "I think people who spend their lives in Washington don't understand what happens in the real economy. They think the people who start businesses are just managers. People who start as entrepreneurs, who start businesses from the ground up, getting investors and hiring people to join them, those people are leaders."
The ABC News/WMUR-TV showdown Saturday was the first debate in more than three weeks, a lifetime in this campaign cycle. Since the last debate in Iowa in mid-December, Gingrich has seen his poll numbers plunge, while Santorum, once an afterthought in the battle for the nomination, has seen his numbers surge. But a rise in the polls brings more scrutiny.
Santorum was targeted by Paul on Saturday as a "big government person," to which he responded: "I'm a conservative, not a libertarian. I believe in some government," an apparent reference to Paul's calls for eliminating government departments and agencies.
Paul also went after Gingrich on Saturday, calling him a "chicken hawk" who avoided military service by obtaining deferments. Gingrich responded angrily that he wasn't eligible for the draft back then.
No similar exchange occurred Sunday.
Gingrich finished a disappointing fourth in the Iowa caucuses, while Perry finished fifth. Both are considered likely to stay in the race through the South Caroline primary and the following primary in Florida even if Romney easily wins New Hampshire, as expected.
Perry made news at the Saturday debate, saying he would support sending troops back into Iraq. U.S. forces completed their pullout from Iraq last month after eight years of war. But Perry predicted that neighboring Iran would enter Iraq without American troops there to defend the country.
"They're going to move back in and all of the work we've done, every young man that has lost his life in that country would have been for naught because we've got a president who does not understand what's going on in that region," Perry said.
It was one of the few times the candidate differentiated himself from his rivals, none of whom have suggested sending U.S. forces back into Iraq. Nearly eight out of 10 Americans said they approved of the U.S. pullout from Iraq, according to a CNN/ORC International poll conducted last month.
CNN's Paul Steinhauser, Rachel Streitfeld, Gabriella Schwarz, Shawna Shepherd and Shannon Travis contributed to this report.