The Supreme Court on Monday unanimously shut down a huge global-warming lawsuit in which states asked the federal courts to regulate polluting power plants. The justices said that is a job for the Environmental Protection Agency.

Writing for her colleagues, Justice Ruth Bader Ginsburg said Congress in the Clean Air Act gave responsibility for curbing carbon dioxide emissions to the EPA.

The Obama administration had asked the court to stop the suit first filed by eight states, the city of New York and several environmental groups and said the agency would issue regulations for the aging power plants by May 2012.

Ginsburg said the states and groups may challenge the EPA’s actions, but a national policy was better than limits set by individual federal judges.

“The appropriate amount of regulation in any particular greenhouse gas-producing sector cannot be prescribed in a vacuum: as with other questions of national or international policy, informed assessment of competing interests is required,” she wrote.

“The expert agency is surely better equipped to do the job than individual district judges issuing ad hoc, case-by-case injunctions. Federal judges lack the scientific, economic, and technological resources an agency can utilize in coping with issues of this order.”

Peter Keisler, who represented the five power plants named in the suit, said the ruling means “companies that provide vital services to the public can continue to operate — in accordance with governing statutes and regulations — without the threat of federal ‘climate change tort litigation.’ ”

Environmental groups chose to see the silver lining.

“Today’s ruling reaffirms the Environmental Protection Agency’s duty under the nation’s 40-year-old Clean Air Act to safeguard public health and welfare from dangerous carbon pollution,” said David Doniger of the Natural Resources Defense Council. “Now the EPA must act without delay.”

Eight states initially banded together to sue: California, Connecticut, Iowa, New Jersey, New York, Rhode Island, Vermont and Wisconsin (New Jersey and Wisconsin have since withdrawn).

They filed federal common law public nuisance claims against older power plants in Ohio, North Carolina, Georgia and Minnesota, as well as the Tennessee Valley Authority. Collectively, the plants produce 650 tons of carbon dioxide, about 10 percent of the country’s emissions.

But the political and legal landscape changed since the suit was filed in 2004. The court ruled in another suit, Massachusetts v. EPA, in 2007 that the agency had responsibility to regulate greenhouse gas emissions from motor vehicles and that the states could force the agency to act.

The Obama administration has taken steps against emissions from vehicles and from new industrial plants, but not older ones. The U.S. Court of Appeals for the 2nd Circuit in New York ruled that this case could go forward since the EPA had not acted.

But Ginsburg said such an action is not warranted until the EPA decides whether to issue regulations. If the groups are not satisfied, they can then go to the federal courts, she said.

Amanda Leiter, a professor at American University’s Washington College of Law, said plaintiffs “got the best they realistically could have hoped for.”

That included a strong reaffirmation of the court’s 5 to 4 decision in Massachusetts and “a very pointed reminder that plaintiffs have a remedy in the federal courts in the event that the EPA fails to act or fails to issue reasonable regulations.”

While the administration has started the process, its actions are under fire by some in Congress. The Republican-controlled House passed a bill to keep the EPA from regulating global warming gases under the Clean Air Act , although the Senate did not agree.

The debate has pitted the administration’s belief in climate change against Republican skeptics, who warn that the proposed regulations would cost jobs.

The justices stayed out of that fight.

“The Court, we caution, endorses no particular view of the complicated issues related to carbon-dioxide emissions and climate change,” Ginsburg wrote in a footnote.

Justice Sonia Sotomayor did not participate in the case. She was on the panel of the U.S. Court of Appeals for the 2nd Circuit in New York, which heard the case. She was nominated and confirmed to the Supreme Court before the decision to allow the case to move forward was announced.

The case is American Electric Power Co. v. Connecticut .

Staff writer Juliet Eilperin contributed to this report.