Republican presidential candidates Mitt Romney and Rick Santorum quarreled over their credentials to be president and their capacity to defeat President Obama during a debate in which all the candidates squabbled over spending, leadership, national security and military service.

But the debate failed to live up to expectations that Romney’s rivals would use the occasion to blunt his momentum. His opponents criticized him sporadically and to little effect, allowing Romney to glide easily through the nearly two-hour forum. Recent polls show the former Massachusetts governor cruising toward victory in Tuesday’s primary, an outcome that could put him in an even stronger position heading toward South Carolina’s primary Jan. 21.

Santorum, who got a major boost by his near-victory in Iowa, is striving to become the principal alternative to Romney. Late in the debate, he appealed for support by criticizing Romney for backing an individual mandate for health care in Massachusetts and the financial bailout. He said he would present a starker choice against Obama.

“If you want someone that’s a clear contrast, that has a strong record, has a vision for this country that’s going to get this country growing and appeal to blue-collar workers in Pennsylvania, in Ohio, in Michigan, in Indiana and deliver that message, that we care about you, too, not just about Wall Street and bailing them out, then I’m the guy that you want to put in the nomination,” he said.

Romney and Santorum argued early in the debate over what attributes make the better president. Santorum charged that the nation doesn’t need a CEO or manager — a knock on Romney’s private-sector experience — and said the nation needs a leader with vision.

“The commander in chief of this country isn’t a CEO. It’s someone who has to lead,” he said. “Being the president is not a CEO. You can’t direct . . . members of Congress and members of the Senate as to how you do things. You’ve got to lead and inspire.”

But Romney countered that Santorum didn’t understand what it takes to turn around the economy or the role of those who work in the private sector. “I think people who spend their life in Washington don’t understand what happens out in the real economy,” he said. “They think that people who start businesses are just manager. . . . My experience is in leadership.”

Romney also defended his work in the private sector against charges that Bain Capital engaged in buying and selling companies that resulted in substantial layoffs of workers while he and his partners made millions. “This is a free-enterprise system,” he said. “We don’t need government to come in and tell us how to make businesses work. We need people with passion, willing to take risk and help turn things around. And where that works, you create jobs.”

Former House speaker Newt Gingrich said, “I’m very much for free enterprise. . . . I’m not nearly as enamored of a Wall Street model where you can flip companies, you can go in and have leveraged buyouts, you can basically take out all the money, leaving behind the workers.”

For Romney, however, the debate proved far less stressful than he and his advisers had anticipated, with some of some of the sharpest exchanges involving other candidates.

The most electric moment came when Rep. Ron Paul (Tex.) and Gingrich clashed over Paul’s earlier comment that Gingrich was a “chicken hawk” for taking deferments instead of serving in the military during the Vietnam War but is advocating for military action today.

Gingrich upbraided Paul. “Dr. Paul has a long history of saying things that are inaccurate and false,” he said. “The fact is, I never asked for deferment. I was married with a child. It was never a question. My father was, in fact, serving in Vietnam in the Mekong Delta at the time he’s referring to.”

Paul responded icily, “When I was drafted, I was married and had two kids, and I went.”

Paul, who is airing an ad accusing Santorum of hypocrisy, called him a “big-government, big-spending” member of Congress and someone who has voted for earmarks repeatedly. “He preached to the fact he wanted a balanced-budget amendment but voted to raise the debt [ceiling] five times,” Paul said. “So he is a big-government person.”

Santorum rejected a charge by Paul that his record showed that he was corrupt, calling it “ridiculous.” Responding to the complaint that he had raised the debt ceiling, he said, “I’m a conservative. I’m not a libertarian. I believe in some government. I do believe that government has — that as a senator from Pennsylvania that I had a responsibility to go out there and represent the interests of my state.”

Romney got into an exchange with ABC’s George Stephanopoulos, one of the moderators, over whether states have the constitutional right to ban contraception. Romney fired back that it was an “unusual topic” to raise, given that no states are asking to do so. The two sparred over the issues until Romney brought it to a close with this comment: “Contraception? It’s working just fine — just leave it alone.”

Romney and former Utah governor Jon Huntsman Jr. clashed sharply over China policy. Huntsman accused Romney of grandstanding with tough rhetoric toward China, while Romney upbraided Huntsman, who was appointed U.S. ambassador there by Obama, for his service there.

“You were, the last two years, implementing the policies of this administration in China,” Romney said. “The rest of us on this stage were doing our best to get Republicans elected across the country and stop the policies of this president from being put forward.”

Texas Gov. Rick Perry’s best moment came when he tried to distinguish himself from the others onstage by saying that the party needs to nominate a true outsider. “It doesn’t make any difference whether you’re an insider from Washington, D.C., or you’re an insider from Wall Street,” he said. “That is what Americans rightfully see is the real problem in America today.”

Saturday’s debate was the 14th in the GOP campaign. The debate at St. Anselm College was sponsored by ABC News, WMUR-TV of New Hampshire and Yahoo News.

Saturday’s debate will be followed by an unusual Sunday morning forum in a special edition of NBC’s “Meet The Press.” The New Hampshire Union Leader and Facebook will co-sponsor that debate.

The back-to-back debates will test the stamina of a field of candidates already bone tired from constant campaigning. They provide Santorum and other Romney rivals a chance to make the case against him, as well as a way for Romney to lock down his support in a state he lost four years ago. But the two forums also left little margin for error for any candidate who made a mistake, given the limited time until the voting starts on Tuesday morning.

Earlier Saturday, Romney appeared buoyant at a morning rally, but asked his supporters to take nothing for granted. “Let me tell you,” he said, “don’t get too confident with those poll numbers. I’ve watched polls come and go. Things change very quickly. It’s very fluid. I need to make sure you guys get your friends to go out, and you vote, as well.

It was an unusual plea from the former Massachusetts governor, who at campaign events sometimes forgets to even ask people for their votes, let alone urge them to rally their friends. But it was in keeping with the furious push his campaign is making this weekend to fire up his supporters in this state whose voters historically break in the final hours.

Santorum got a potential boost in his effort to consolidate conservative support with news that he had received the endorsement of Gary Bauer, a prominent social conservative and chairman of the Campaign for Working Families. Bauer plans to join Santorum at a rally in Greenville, S.C., on Sunday night.

Bauer ran unsuccessfully for the Republican nomination in 2000. In a statement, Bauer said that, while there are “many fine candidates” competing for the nomination, none personifies “the Reagan-inspired conservatism that unites the GOP” better than Santorum does.

Gingrich spoke Saturday at a World War II museum that included a Pershing tank on display. He began with a joke about Michael S. Dukakis, the former Massachusetts governor who as the 1988 Democratic nominee was ridiculed for being photographed in a tank with an oversize helmet. “It’s just a reminder that governors of Massachusetts don’t always make good presidential candidates.”

Staff writers Aaron Blake, Amy Gardner, Rosalind S. Helderman and Felicia Somnez contributed to this report.