Judge Andrew Napolitano went after President Obama for making "totally inappropriate" remarks about an upcoming ruling on ObamaCare subsidies.

In remarks from the G7 summit yesterday, Obama maintained there is no legal basis for the Supreme Court to overturn a key provision of the Affordable Care Act.

He argued it's an "easy case" that never should have gotten to the highest court in the first place.

"It's not something that should be done based on a twisted interpretation of four words in, as we were reminded repeatedly, a couple of thousand page piece of legislation," said Obama, predicting that "the Supreme Court's going to do what most legal scholars who have looked at this would expect them to do."

The president then said that he believes Congress could fix the law if the Supreme Court rules against it. 

The case comes down to whether people who enrolled through the federal HealthCare.gov exchange are entitled to subsidies. The opponents say the law's language only allows for subsidies for those buying insurance on state-run exchanges.

Napolitano took issue with the president's assertion that legal scholars are on his side and remarked that the Supreme Court justices will not be "intimidated." 

He explained that the court has most likely voted on the issue already and we are now just waiting to hear the ruling.

"They couldn't care less what he says. He's wrong that legal scholars are on his side. Legal scholars are on both sides and the Supreme Court does not count noses among legal scholars," said Napolitano.

He added that in his view, it was "totally inappropriate" for the president make those remarks about a case that is pending before the Supreme Court.

"I don't know why he said what he said today. He can't intimidate them. He can't change their minds. He had his facts wrong. It's totally inappropriate for the president to do that. He should have said, 'the case is before the court and however the court rules, we will abide by that ruling.'"

Watch the judge's full analysis above.