Monday’s ruling could compel agencies to take costs into account when deciding to regulate.

President Obama has made it clear that his Environmental Protection Agency will use its regulatory power to install limits on carbon dioxide and toxic-air pollutants for everything from power plants to trucks.

But Monday’s Supreme Court decision against EPA is a reminder that the biggest threat to Obama’s green legacy and the sweeping regulatory agenda that the administration is racing to cement before the president leaves office comes from the courts.

The 5-4 decision, with the majority opinion penned by Justice Antonin Scalia, ruled that EPA violated the law by failing to consider cost in deciding to regulate toxic-air pollution from power plants. That verdict is a setback to the administration at a time when all hands on deck are needed to defend the president’s climate agenda. It creates uncertainty over the fate of a key pillar of the president’s efforts to curb air pollution and hands a fresh set of talking points to opponents of the rule as they argue that the administration overreached.

The biggest impact, however, may be felt down the road—and across the entire federal government.

Some legal experts contend that the ruling could send a message to federal agencies that they must demonstrate that they have taken cost into account when deciding to regulate—and that if an agency ignores cost, it does so at its own peril.

“This is a groundbreaking administrative-law case,” said Justin Savage, a former Justice Department environmental lawyer who served under the administrations of George W. Bush and Obama and a partner with the law firm Hogan Lovells. “It essentially says that when a statute is ambiguous an agency must consider costs.”

“The reason I’m struck by this and a bit troubled is that there’s a real question of whether this decision applies broadly. And I read it as applying broadly,” said Lisa Heinzerling, a Georgetown law professor and senior climate-policy counsel to former EPA Administrator Lisa Jackson.

If that precedent sticks, it could throw a wrench into the gears of the regulatory machine if agencies must devote additional time and resources making sure their cost calculations hold up in court.

“After this decision, an agency would not want to walk into court saying, ‘Your Honor, we did not consider costs at all when deciding to take regulatory action on an issue,’” said Jonathan Adler, an environmental law professor at Case Western Reserve University.

Even if the court decision does not set such a precedent, Republicans and industry challengers say Monday’s verdict proves that the administration overstepped the limits of the law.

“The mere fact that the EPA wished to ignore the costs of its rules demonstrates how little the agency is concerned about the effects it has on the American people,” House Majority Leader Kevin McCarthy said after the ruling was handed down. “From its ozone, to greenhouse gas, to navigable waters rules, the EPA continues to burden the public with more and more costs, even as so many are still struggling to get by and improve their lives in this economy.”

The Supreme Court’s decision to side against the agency also serves as a painful reminder to the administration that it may not always see its regulatory actions upheld in the face of legal challenges.

“By EPA’s logic, someone could decide whether it is “appropriate” to buy a Ferrari without thinking about cost, because he plans to think about cost later when deciding whether to upgrade the sound system,” Scalia wrote in the majority opinion.

For now, the mercury regulation remains in place. A lower court will decide whether the rule will stay on the books while the agency determines how to comply with the high court’s ruling.

“We are reviewing the decision and will determine any appropriate next steps once our review is complete. 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,” Melissa Harrison, a spokeswoman for the agency said after the verdict.

Ultimately, the scope of the ruling may not become clear until additional litigation has a chance to test its limits. And a slate of environmental lawyers were quick to say that the ruling won’t create a ripple effect.

“The Supreme Court’s holding was narrow,” said Peter Zalzal, an attorney with the Environmental Defense Fund. “The court focused here on a specific provision of the Clean Air Act, and we fully expect that the agency will be able to quickly prepare a finding that reasonably takes costs into account as the Supreme Court has directed.”

And while some legal experts say the question of whether EPA failed to appropriately consider costs in deciding to regulate carbon pollution from power plants—the centerpiece of the president’s climate agenda—likely will surface in challenges to the regulation that is due to be finalized this summer, others waved away that concern.

“Sure, litigants will try to use whatever they can to make their case, but I don’t think this ruling provides strong precedents going forward for industry opponents to EPA rules, unless they happen under the identical provision at stake in this case,” said Ann Carlson, an environmental law professor at the UCLA School of Law.

"Former Secretary of State Rex Tillerson was spotted entering a congressional office building on Tuesday morning for what a committee aide told The Daily Beast was a meeting with the leaders of the House Foreign Affairs committee and relevant staff about his time working in the Trump administration. ... Tillerson’s arrival at the Capitol was handled with extreme secrecy. No media advisories or press releases were sent out announcing his appearance. And he took a little noticed route into the building in order to avoid being seen by members of the media."