Washington (CNN) -- The Supreme Court has given big business, unions and nonprofits more power to spend freely in federal elections, a major turnaround that threatens a century of government efforts to regulate the power of corporations to bankroll American politics.

A 5-4 conservative majority crafted a narrow overhaul of federal campaign spending Thursday that could have an immediate effect on this year's congressional midterm elections. The justices eased long-standing restrictions on "independent spending" by corporations and unions in political campaigns.

"When government seeks to use its full power, including the criminal law, to command where a person may get his or her information or what distrusted source he or she may not hear, it uses censorship to control thought," Justice Anthony Kennedy wrote for the majority. "The First Amendment confirms the freedom to think for ourselves."

The opinion radically alters the election calculus, offering greater spending flexibility for a broader range of for-profit and nonprofit groups seeking a voice in the crowded national political debate.

Hours after the ruling, President Obama responded, saying the court has given "the special interests and their lobbyists even more power in Washington -- while undermining the influence of average Americans who make small contributions to support their preferred candidates."

In a statement, he said he is telling his administration "to get to work immediately with Congress on this issue. We are going to talk with bipartisan congressional leaders to develop a forceful response to this decision. The public interest requires nothing less."

"The Supreme Court has given a green light to a new stampede of special interest money in our politics," Obama said. "It is a major victory for big oil, Wall Street banks, health insurance companies and the other powerful interests that marshal their power every day in Washington to drown out the voices of everyday Americans."

Reaction on the other side said the ruling was long overdue.

"The Supreme Court's decision today is a victory for the First Amendment and the right of all Americans to participate in the political process," said Theodore Olson, who successfully argued the case for the conservative Citizens United.

In a dissent to the opinion, Justice John Paul Stevens wrote, "In a democratic society, the long-standing consensus on the need to limit corporate campaign spending should outweigh the wooden applications of judge-made rules."

He added, "The court's ruling threatens to undermine the integrity of elected institutions around the nation."

The case was the first one heard on the bench for newest Justice Sonia Sotomayor, and she voted in dissent with her three more liberal colleagues.

The issue hinged on whether corporations' ability to pour money into election campaigns could be strictly regulated, or whether corporations have free-speech rights to spend their cash to influence elections, just as individual donors do.

In this ruling, the justices also nullified earlier rulings upholding the core of a 6-year-old federal law aimed at curbing corporate campaign spending. Under current law, there are severe restrictions on campaign ads used by corporations for federal elections. They generally must be issue-focused -- talking about abortion or taxes, for instance -- and not expressly supporting or opposing a candidate. Those limits have now been generally removed.

The specific case grew out of a documentary on Hillary Clinton. Produced last year by Citizens United, "Hillary: The Movie" was a scorching attack on the then-presidential candidate. The filmmakers wanted to promote it during the heat of the 2008 primary season, but a federal court blocked any ads, as well as airings on cable television's video on demand.

On that specific question, the justices ruled against Citizens United, saying federal restrictions on broadcast ads are appropriate.

"Citizens United's narrower arguments are not sustainable under a fair reading of the statute," Kennedy wrote.

The Washington-based nonprofit corporation and advocacy organization balked at campaign finance rules that would have required disclosure of its financial backers, and restrictions on when the film could air. It was financed with a mix of corporate and individual donations.

Navigating the complex, ever-evolving landscape of election money rules has spurred a cottage industry of financial, political and legal armies, ready to do battle over the money and the message. The crux of this dispute, like others before it, is just how far the government may go to regulate campaign spending and campaign ads.

In his opinion, Kennedy acknowledged that, but said Americans should be trusted to decide competing election issues.

"The appearance of influence or access," he wrote, "will not cause the electorate to lose faith in our democracy."

"Our nation's speech dynamic is changing, and informative voices should not have to circumvent onerous restrictions to exercise their First Amendment rights," Kennedy said. "The censorship we now confront is vast in its reach."

But Stevens, who read part of his harsh dissent from the bench, said, "The court's opinion is thus a rejection of the common sense of the American people, who have recognized a need to prevent corporations from undermining self-government since the founding."

Justice Samuel Alito and Chief Justice John Roberts were key to the ruling, agreeing with their more conservative colleagues. Alito replaced moderate Justice Sandra Day O'Connor, who upheld past corporate restrictions in 2003, when the high court last confronted the issue.

Section 203 of the comprehensive Bipartisan Campaign Finance Reform Act of 2002, widely known as the McCain-Feingold law, bans the broadcast of "electioneering communication" by corporations, trade groups, unions and some issue advocacy groups, if the material would air close to election dates and identify candidates by name or image.

The law also requires an on-screen notice of the groups financing such ads, as well as public disclosure of all who donated to the sponsoring organizations.

The landmark McCain-Feingold law took effect the day after the November 2002 elections.

Among its many provisions are a ban on "soft money," the unlimited and unregulated contributions to national political parties; a ban, in the 60 days before an election, on advocacy ads, those criticizing or supporting a candidate's stand on an issue; contribution limits; and donor disclosure requirements.

Much of McCain-Feingold remains unaffected by the high court's latest ruling, including the current ban on large, unregulated donations to political parties and the candidates themselves by corporations. The case also does not affect political action committees, separate groups created by corporations, unions and others that can contribute directly to federal candidates.

PAC money has a $5,000-per-candidate limit, and must be funded through voluntary contributions from employees, members or individuals, not by direct corporate or union treasuries.

The ruling could have far-reaching effects beyond the federal arena. Twenty-two states have similar bans on corporate spending in state and local elections. Restrictions on money in gubernatorial, legislative and even judicial races could soon be a thing of the past.

"Campaign 2010 was already bulked up with the potential of campaign ad spending," said Evan Tracey, president of Campaign Media Analysis Group and CNN's consultant on political television advertising. "Now it's on steroids."