ELMAU, Germany (AP) — With a crucial legal decision looming, President Barack Obama said Monday the Supreme Court should not even have considered the latest challenge to his signature health care law but he voiced confidence the justices "will play it straight" — and leave the law intact.

Obama weighed in on the merits of the case against the five-year-old Affordable Care Act as the high court prepares to announce a decision sometime later this month that could wipe out health insurance for millions of people.

Wrapping up a two-day international summit Monday, Obama told reporters there was no reason for the health program to end up in court, maintaining that "the thing is working."

"Frankly, it probably shouldn't even have been taken up," he said.

The remark was a direct and provocative challenge to a court that holds the fate of one of Obama's top legislative achievements in its hands. To prevail, Obama needs the votes of Chief Justice John Roberts or Justice Anthony Kennedy, one of whom most likely voted to hear the case in the first place.

At issue in the case is whether Congress authorized federal subsidy payments for health care coverage regardless of where people live, or only for residents of states that created their own insurance marketplaces. The decision could have far-reaching implications because nearly 6.4 million low- and moderate-income Americans could lose coverage if the court said people who enrolled through the federal site weren't eligible for the subsidies.

Obama says it has been well-documented that Congress never intended to exclude people who went through the federal exchange.

"You interpret a statute based on what the intent and meaning and the overall structure of the statute provides for," said Obama, a lawyer who once taught constitutional law.

Pressed in a news conference on whether he had an alternative if he loses in court, Obama insisted he had no "Plan B." "This would be hard to fix," he said.

But he made it clear that if the court were to rule against him, then he would place the political burden directly on the Republican-controlled Congress, betting that an angry public would demand a fix.

During oral arguments earlier this year before the Supreme Court, Justice Antonin Scalia also suggested that Congress could easily fix it.

"This Congress, your honor?" responded the administration's lawyer, Solicitor General Donald Verrilli Jr., eliciting ripples of laughter from observers in the chamber.

Still, most of the health insurance losses would occur in states governed by Republicans who have resisted the health care law and not created state exchanges. Twenty-six of the 34 states that would be most affected by the ruling have Republican governors, and 22 of the 24 GOP Senate seats up in 2016 are in those states.

As a result, those most affected if the court blocks subsidies are likely to be constituents of Republican lawmakers, a fact not lost on White House officials.

Public opinion remains mixed, however. A recent Washington Post-ABC poll found that a majority of Americans continue to oppose the law. But the poll, conducted at the end of May, also found that 55 percent of those surveyed don't want the court to block any subsidies.

"It's a bad idea," Obama said, noting that the case turns on the interpretation of a short phrase in the law. "It's not something that should be done based on a twisted interpretation of four words in — as we were reminded repeatedly — a couple-thousand-page piece of legislation."

Associated Press writers Ricardo Alonso-Zaldivar and Mark Sherman contributed to this article. Kuhnhenn reported from Washington.