WASHINGTON  President Obama took aim at the Supreme Court on Saturday, saying the justices had “handed a huge victory to the special interests and their lobbyists” with last week’s 5-to-4 decision to lift restrictions on campaign spending by corporations and unions.

The decision will have major political implications for this year’s midterm elections. After it was announced, Mr. Obama immediately instructed his advisers to work with Congress on legislation that would restore some of the limits the court lifted. But in his weekly address on Saturday, he sharply stepped up his criticism of the high court.

“This ruling strikes at our democracy itself,” Mr. Obama said, adding: “I can’t think of anything more devastating to the public interest. The last thing we need to do is hand more influence to the lobbyists in Washington, or more power to the special interests to tip the outcome of elections.”

How much the administration can do about the ruling remains unclear, although Mr. Obama said he had instructed his advisers to work with Congress on a “forceful, bipartisan response.”