TAMPA, Florida— In a brutal week of campaigning here, Newt Gingrich brought out the best in Mitt Romney.

After a summer in the “Mittness Protection Program” and a fall of forgettable debate performances, Gingrich’s emergence as a somewhat credible candidate for the nomination brought Romney out of his shell, and made him a stronger candidate.

A central component of Gingrich’s argument for his candidacy is that he would be able to stand up to Obama in a debate — regularly drawing cheers at campaign stops when he challenges the president to seven Lincoln-Douglas style debates. But Romney has turned those expectations around, schooling Gingrich in the two most recent debates, and showing the base he has the mettle to take on Obama.

Gingrich’s attacks on Romney’s Bain Capital record, especially, have prepared him for the attacks certain to come from the Obama campaign.

“The primary process is tough. That's by design,” Romney adviser Kevin Madden told BuzzFeed. “A tough process produces a tougher nominee. It's helped Governor Romney crystallize his argument to voters, while at the same time the campaign got a head start on combatting some attack lines, like the ones on free enterprise, that we're sure to see from the Obama campaign in a general.”

Romney himself addressed the bitter primary battle in his victory speech last night, saying it is preparing the eventual nominee to face Obama.

“But frankly, I know that if I'm the nominee, Barack Obama is going to spend almost a billion dollars attacking me,” he added on CNN this morning. “So you might as well get it out there now. Learn how to respond, and make sure that we're able to get back to the real issue people care about when the time of the general election comes around.”

The primary fight has led to some notable missteps, like Romney’s $10,000 bet to Rick Perry, and rambling debate answers on the role of free enterprise in his discussions of Bain Capital.

Madden admitted that Romney has at times gotten “distracted” from his jobs message in the midst of all the fighting.

“The down days have been ones where we got distracted and didn't give the governor his best chance to break through with his jobs and economy message,” he said. “But when we put the process stuff behind us and the Gov. can reach voters about his vision for fixing the economy, voters reward him and his message.”

But Gingrich put the campaign into overdrive, and the candidate on this toes.

“Romney is a stronger warrior now, because of Gingrich,” GOP media strategist Alex Castellanos told BuzzFeed. “Victory will wash all the mud of this nomination process away. It always does. Ask Obama and Hillary. He and his campaign are better than they were a year ago, in large part, thanks to Gingrich.”

The primaries have also honed Romney’s operation, said Utah Rep. Jason Chaffetz, who backs Romney.

“The more you spar, the stronger you’re going to be in the big arena come October, November,” he said. “Not only for the candidate, but the staff and the organization that it takes to go out and win these things — you go up to the war room in here and it’s like a NASA launch center. It’s so impressive how organized they are — it’s unbelievable. “

Indeed, it was only today, after Romney crushed Gingrich in the Florida primary, that he slipped up on CNN, saying he’s “not concerned about the very poor.” The competition made him stronger, and now — with the Gingrich threat eliminated — we'll see whether he can keep up the momentum on his own.