President Obama sharply attacked Mitt Romney over the individual mandate on Friday, hitting him for "abandoning a principle" he fought for in the past due to political considerations.

“One of the things that you learn as president is that what you say matters and your principles matter," Obama told a local Cincinnati NBC affiliate, according to excerpts provided by his campaign. "And sometimes, you've got to fight for things that you believe in and you can't just switch on a dime.”


He also criticized the presumptive GOP nominee for saying the mandate was a tax after one of Romney's senior campaign advisers said it was a penalty. Several conservatives, including News Corp. Chairman Rupert Murdoch, expressed concern about how Romney's team handled its response to the Supreme Court's ruling on the law.

“And the fact that a whole bunch of Republicans in Washington suddenly said this is a tax — for six years he said it wasn't, and now he has suddenly reversed himself," Obama noted. "So the question becomes, are you doing that because of politics? Are you abandoning a principle that you fought for, for six years, simply because you're getting pressure for two days from Rush Limbaugh or some critics in Washington?" 

Obama's strong language can be seen as a broader attack on Romney's reputation for flip-flopping on issues. He's been criticized for changing positions on abortion and gay rights, for example.

Romney's campaign responded by pointing out Obama said his law wasn't a tax but his lawyers made that argument before the Supreme Court.

"President Obama is right — as president, what you say matters. It matters that President Obama told the American people that ObamaCare was not a new tax, then sent his lawyers to convince the Supreme Court that it was a new tax, and now is insisting — again — that it is not a tax. Americans deserve straight answers from their president," said Romney campaign spokeswoman Amanda Henneberg. "Mitt Romney believes ObamaCare is a job-killing law that raises a whole series of taxes, cuts Medicare, and gets between patients and their doctors. In order to repeal ObamaCare, we must replace President Obama."

The Supreme Court's ruling to uphold the healthcare reform bill last week has given Obama the opportunity both to take a victory lap over his signature legislation and to use it as a hammer against Romney.

Romney has so far sought to avoid comparisons between the healthcare bill he passed in Massachusetts as governor — sometimes known as "RomneyCare" — and the controversial healthcare bill known as "ObamaCare" by saying what works on the state level should not be applied nationwide. 

He claims the Massachusetts bill, which contained an individual mandate, one of the aspects of Obama's legislation most hated by conservatives, was never a model for the nation and healthcare reform should be left to the states.

But Obama is not about to let him get away with that. “On the healthcare bill, Mr. Romney was one of the biggest promoters of the individual mandate," he said. "In Massachusetts, his whole idea was that we shouldn't have people who can afford to get health insurance to not buy it and then force you or me or John Q. Public to have to pay for him when he gets sick. That's irresponsible. That's exactly what's included as part of my healthcare plan."

Along with absorbing attacks from opponent Obama, Romney's campaign has taken some friendly fire. The conservative editorial board of The Wall Street Journal on Thursday called Romney's campaign "politically dumb" for muddling the Republican response to the ruling.

But, also on Thursday, news leaked that Romney's campaign — in a joint fundraising effort with the Republican National Committee — took in over $100 million in June. Since the Romney campaign also claimed to have raised $5.5 million in the 24 hours after the healthcare ruling, the enormous monthly total sends a strong signal that supporters are getting fired up.

But David Axelrod, senior adviser to Obama's campaign, dismissed the total on "CBS This Morning" on Friday.

"It seems to me that they were looking for some good news today, and this is the best they had," he said.

— This story was updated at 8:30 a.m.