WASHINGTON (CN) — On the last full day of his presidency, Donald Trump’s yearslong effort to shut down Obama-era clean air protections targeting power plants went up in smoke in the D.C. Circuit.

Adding salt to the wound, the federal appeals court’s 182-page opinion released Tuesday was unsigned, written by a mostly unanimous three-judge panel. U.S. Circuit Judge Justin Walker, a Trump appointee who joined the court just a month before the case was heard, penned only a partial dissent.

The panel found the outgoing president’s Affordable Clean Energy rule, adopted in 2019 as part of Trump’s effort to roll back what he considered anti-business regulations, is based on an “erroneous legal premise.” The ACE rule dropped all statewide emissions caps, giving state regulators greater autonomy and more time to reduce pollution.

“The EPA here ‘failed to rely on its own judgment and expertise, and instead based its decision on an erroneous view of the law,” the ruling states, noting federal law does not limit the agency to implementing rules that apply directly “at the source” of power plant emissions.   

The American Lung Association and the American Public Health Association first sued to challenge Trump’s ACE rule in 2019, challenging the new administration’s effort to undo one of President Barack Obama’s landmark environmental regulations. Dozens of parties jumped on the case and over 170 others filed amicus briefs in the legal showdown that came to a head in the Washington appeals court. 

During oral arguments last October, the EPA argued the difference in net cumulative emissions between the new rule and the Obama-era Clean Power Plan is “slight,” telling the D.C. Circuit panel the energy industry has been effectively self-regulating and already exceeded the prior regulatory scheme’s 2030 goals. 

But the lineup of parties urging the appeals court to hold the Trump administration to its regulatory duty to reduce carbon dioxide emissions warned the pollutant is a major contributor to climate change. 

The court held Tuesday that there is “no basis—grammatical, contextual, or otherwise—for the EPA’s assertion” about source-specific language in federal law that it claims limits its oversight of fossil fuel power sources.

“As the EPA at times acknowledges, the two subsections address distinct steps in the regulatory process, one focused on the EPA’s role and the other focused on the states’. Any question as to which limitations pertain to each regulatory actor cannot reasonably be said to have been resolved by Congress in favor of the unambiguous meaning the EPA now advocates,” the ruling states.

Walker was joined on the panel by U.S. Circuit Judges Cornelia Pillard and Patricia Millett, both Obama appointees. 

While the Trump appointee mostly concurred with his colleagues, Walker filed a partial dissent saying he took issue with both Obama and Trump’s regulatory efforts. 

“In my view, the EPA was required to repeal the first rule and wrong to replace it with provisions promulgated under § 111,” Walker wrote, referring to a section of the Clean Air Act.

“That’s because coal-fired power plants are already regulated under § 112, and § 111 excludes from its scope any power plants regulated under § 112,” he wrote. “Thus, the EPA has no authority to regulate coal-fired power plants under § 111.”

The decision was applauded by several health and environmental groups, including the American Lung Association, the American Public Health Association and Clean Air Task Force, which were all plaintiffs in the dispute.

“Our organizations challenged EPA’s actions to repeal the Clean Power Plan and adopt the ACE rule because they did not fulfill EPA’s legal duties and obligations to protect public health under the Clean Air Act,” the three groups said in a joint statement. “EPA’s actions increased harmful climate pollution and took a huge step backward in the critical race to avoid the worst impacts of climate change.”

In an emailed statement, EPA spokesperson Molly Block said the agency was disappointed by the panel’s ruling. 

“The decision risks injecting more uncertainty at a time when the nation needs regulatory stability,” Block added. 

Among those who argued against the ACE rule was Virginia Attorney General Mark Herring. The Democrat, who joined 22 other states in an amicus brief trashing Trump’s plan as dangerous to some of the country’s most vulnerable areas, called the ruling “an important win for climate change efforts and protecting our environment.”

“During his time in office, President Trump has made it no secret that combating climate change in our country was not a priority for him and his ‘dirty power’ rule not only violated the Clean Power Plan but would have moved the country away from focusing on clean, renewable energy sources,” Herring said. “Virginia knows all too well the devastating effects climate change and sea level rise can have on communities, especially in Hampton Roads, and I will continue to do all I can to protect measures that cut down on pollution and help reverse climate change in our country.”

While the ruling was welcomed by health and environmental groups, it only returns things to the status quo. 

Litigation tied up Obama’s Clean Power Plan shortly after it was passed and it never took effect thanks to a Supreme Court stay in 2016.

The Trump effort to roll it back started in 2017 before culminating with the ACE rule in 2019. Now the ACE rule too will be bound up in legal purgatory, if not scrapped entirely by the incoming Biden administration.