Several past rivals who had been fiercely critical of former Massachusetts governor Mitt Romney took to the morning talk shows on Sunday to defend the presumptive Republican presidential nominee against an onslaught of Democratic attacks on his job-creation record.

Appearing on NBC’s “Meet the Press,” former House speaker Newt Gingrich — who just four months ago accused the private-equity firm Bain Capital of “looting” companies for profit under Romney’s leadership — acknowledged that he “went straight at [Romney] on the Bain issue,” before praising his tenure at Bain.

“If you look over time, most of the companies being invested in did well,” Gingrich said. “Most of them paid off the debt. If you look at Staples, for example, the return on investment was enormous. They paid off all the debt.”

Former New York mayor and 2008 Republican presidential candidate Rudolph W. Giuliani attributed his past criticism of Romney to “a certain amount of personal ego.” And in addressing his past statements and defending the former governor’s job-creation record in Massachusetts on CNN’s “State of the Union,” Giuliani apparently could not resist an opportunity for a little self-promotion.

“At that point I was probably comparing his record to my record, and maybe it was circumstances or whatever, but I had massive reduction in unemployment,” Giuliani said. “He had a reduction in unemployment of about 8 percent, 10 percent — I think it was 15 percent. I had a reduction in unemployment of 50 percent. They had a growth of jobs of 40,000; we had a growth of jobs of 500,000. So I was comparing what I thought was my far superior record to his otherwise decent record, but the numbers weren’t as great. That’s all part of campaigning.”

Sen. John McCain (Ariz.), who defeated Romney for the GOP nomination in 2008, softened his past criticism on “Fox News Sunday.” After noting that McCain had described President Obama’s recent attacks on Romney’s record at Bain as “class warfare at its worst,” host Chris Wallace reminded McCain of his own criticism of Romney’s past, which he described as “[managing] companies, and he bought and sold, and sometimes people lost their jobs.”

“This is the free-enterprise system,” McCain said. “The only place in the world that I can recall where companies never failed was the old Soviet Union. This is what investors do in a free-enterprise and capitalistic system. When you take $5 million in a warehouse and you end up with Staples, I would argue that that’s what it’s all about.”

McCain added: “And yes, [a] free-enterprise system can be cruel.”