Washington CNN  — 

In a loss for the Obama administration, the Supreme Court ruled that the EPA unreasonably interpreted the Clean Air Act when it decided to set limits on the emissions of toxic pollutants from power plants without first considering the costs on the industry to do so.

The ruling was 5-4, with Justice Antonin Scalia writing for the majority. Justice Elena Kagan wrote the dissent for the four liberal justices.

Bill Schuette, the attorney general for Michigan, the state named in the suit, cheered the ruling, as did several conservative groups and business organizations.

“Today’s ruling is a victory for family budgets and job creation in Michigan,” Schuette said in a statement. “The court agreed that we can and must find a constructive balance in protecting the environment and continuing Michigan’s economic comeback.”

EPA spokeswoman Melissa Harrison said the agency was reviewing the decision Monday.

“EPA is disappointed that the Court did not uphold the rule, but this rule was issued more than three years ago, investments have been made and most plants are already well on their way to compliance,” Harrison said in a statement.

The ruling also quickly became a presidential campaign talking point as former Texas governor and recently declared 2016 hopeful Rick Perry used it to hammer the Obama administration.

“Today’s ruling ends the false narrative that environmental protection can only be achieved through one-size-fits-all federal mandates and at the expense of economic growth - a premise that has been debunked in states like Texas, where smart regulations have proven economic opportunity and environmental protection are not mutually exclusive,” Perry said in a statement.

Earthjustice DC Senior Associate Attorney Neil Gormley, whose group that filed a brief in support of EPA, said the court’s ruling “doesn’t change EPA’s authority to protect the public from toxic air pollution.”

“It just gives the agency another hoop to jump through. Now EPA should act quickly to finalize these crucial health protections,” Gormley said in a statement.

The Obama administration argued that air pollutants like mercury and arsenic are associated with birth defects, cancer and other risks, especially for pregnant women and children. They say coal and oil fired power plants are the single biggest contributor to mercury contamination of rivers and lakes.

The Clean Air Act directs the EPA to regulate hazardous pollutants from power plants if the regulation is found to be “appropriate and necessary.”

The EPA determined it was appropriate to regulate coal and oil fired power plants.

At issue in this case was whether the EPA violated the Clean Air Act when it declined to consider costs in determining whether it was appropriate to regulate hazardous air pollutants.

Twenty-three states and some in the industry argued that the EPA should have considered costs when making a threshold determination on whether to regulate.

“EPA’s decision that it is ‘appropriate’ to achieve $4 million to $6 million in health benefits at a cost of $9.6 billion is not reasonable, imposes great expenses on consumers, and threatens to put covered electric utilities out of business,” lawyers for Michigan and 22 other states argued in Court briefs.

Opponents in the industry said that under the EPA rule the industry will be forced to spend billions of dollars to regulate conventional pollutants that are already regulated under other Clean Air Act programs.

On the other hand, the EPA argued that it didn’t take costs into consideration initially because the threshold decision is meant to be based on public health alone. Lawyers for the agency said that once it was determined that the air pollutants from coal and oil fired power plants posed a major hazard to public health they moved to the next stage of process under the Clean Air Act to determine what the limits on these pollutants should be. When they considered that issue, they did take costs into consideration.

“When you add up all the costs and all the benefits, ” Gormley said. “The health benefits of this rule dwarf the costs to the industry. The public gets 9 dollars of health benefits for every what 1 dollar the industry spends.”

CNN’s Kevin Bohn and Jim Acosta contributed to this report.