Obama took issue with a ruling that overturned two of the court's precedents and upended decades of restrictions on corporations being able to use their profits to finance campaigns for and against candidates.

It proved to be a striking State of the Union moment: With six justices seated in their black robes directly in front of him in the House chamber, Obama said: "With all due deference to separation of powers, last week the Supreme Court reversed a century of law that, I believe, will open the floodgates for special interests, including foreign corporations, to spend without limit in our elections."

"I don't think American elections should be bankrolled by America's most powerful interests or, worse, by foreign entities," Obama continued. "They should be decided by the American people. And I urge Democrats and Republicans to pass a bill that helps correct some of these problems."

The court's 5 to 4 decision, in which Alito was in the majority, said it did not have to address the question of electoral spending by foreign firms, because the law being considered did not differentiate between domestic and foreign corporations. But Democrats have seized on the issue as a way to highlight legislation in response to the court's ruling. There are restrictions on foreign participation in U.S. elections that were not part of the case, Citizens United v. Federal Election Commission.

Reaction to the interplay between the president and the court -- especially Alito, President George W. Bush's second nominee to the court -- was swift. The liberal People for the American Way sent out a YouTube clip of Alito and praised the president for bringing up the decision.

Conservative legal groups said it was the president who was wrong, to have brought up the case in that setting.

"The president's swipe at the Supreme Court was a breach of decorum, and represents the worst of Washington politics -- scapegoating 'special interest' boogeymen for all that ails Washington in attempt to silence the diverse range of speakers in our democracy," said Bradley A. Smith, a former FEC member and the chairman of the Center for Competitive Politics.