This story was originally published by Mother Jones and is reproduced here as part of the Climate Desk collaboration.

President Obama’s signature climate change initiative had its day in court Tuesday, as lawyers for 27 states, nonprofit groups, and utility companies argued that it is unconstitutional.

The rule, known as the Clean Power Plan, would enforce a 32 percent reduction in greenhouse gas emissions from electric power plants by 2030 (compared with 2005 levels). As part of the implementation, the Environmental Protection Agency would require states with at least two coal-fired power plants to submit plans for emissions reductions. If a state chose not to submit an acceptable plan, the EPA would impose one on it. The plan was a critical piece of the Obama administration’s successful efforts to forge the landmark Paris climate agreement last year.

The administration is relying on a section of the Clean Air Act as justification for the regulations, arguing that the law, originally passed by Congress in 1970 and later amended, empowers the EPA to “protect public health and welfare” from pollutants — in this case, carbon emissions that are driving global warming.

But the Clean Power Plan’s path has not been an easy one. Even before the regulations had been finalized, opponents sued to block it — a move that the D.C. Circuit Court of Appeals rejected last year. Opponents had more success once the final version of the rule was adopted. In a 5-4 decision in February, the Supreme Court issued an unusual stay, which prevented the rule from being implemented before it made its way through the courts. Yesterday’s arguments were the latest episode in the legal drama.

A panel of 10 federal judges heard the case in a marathon session that pitted the administration’s lawyers and environmental groups against a slate of opponents who argued the regulations exceed the EPA’s authority. West Virginia Solicitor General Elbert Lin charged that the rule would create a complex “new energy economy.” Others, such as attorney David Rivkin, who represents the state of Oklahoma, argued the Clean Power Plan intrudes on states’ rights to regulate their own electric grids. There were also several hours of highly technical arguments relating to inconsistent language in the House and Senate versions of a 1990 amendment to the Clean Air Act.

At a panel discussion on Monday, Texas Attorney General Ken Paxton, whose state is part of the coalition suing to block the rule, said the Clean Power Plan “represents an unprecedented expansion of federal authority.”

Others, such as attorney Allison Wood, who represents utility industry groups, told the court that the EPA can’t regulate emissions from sources like power plants under one section of the Clean Air Act when it already does so under a different section.

But Judge Cornelia Pillard, an Obama appointee, questioned this “double regulation” argument, pointing to laws that require motorists to drive on the right side of the road while also following the speed limit.

On constitutional grounds, the plan has one unlikely critic: Laurence Tribe, a liberal Harvard lawyer and former mentor to Obama who is participating in the case on behalf of the opponents to the rule. During Tuesday’s hearing, Tribe argued the Clean Power Plan violates the separation of powers between the executive and legislative branches of the federal government. If the Obama administration wants to regulate greenhouse gas emissions, he told the judges, “the solution is to go to Congress.”

But advocates say the Supreme Court has already determined that the EPA can regulate carbon dioxide. In the 2007 Massachusetts v. EPA case, they note, the court found that the Clean Air Act gives the EPA authority to regulate greenhouse gas emissions from motor vehicles.

After a long day of arguments, supporters of the plan were optimistic. “I think it was a remarkable day,” said Howard Fox, counsel for Earthjustice, an environmental law organization that signed on to a motion in support of the Clean Power Plan, on a conference call with reporters.

Where will the fight over the Clean Power Plan end up, and what does it mean for Obama’s legacy on climate issues?

If the D.C. Circuit were to find that the EPA exceeded its authority, it would remand the case to a lower court and the “EPA would essentially redo the rule,” Joanne Spalding of the Sierra Club told Mother Jones at a briefing. That would leave the country’s climate regulations in the hands of an administration led by either Hillary Clinton or Donald Trump.

Another pathway is to the Supreme Court. West Virginia Attorney General Patrick Morrisey, who has led the charge against the Clean Power Plan, speculated at a panel discussion that if the current case doesn’t go his way, it could wind up at the Supreme Court in the fall of 2017. This time around, the result could be very different; Justice Antonin Scalia died in February shortly after casting one the deciding votes to put the regulations on hold. With the court now potentially split 4-4 on the issue, the fate of the Clean Power Plan could be tied to the ongoing fight over Scalia’s replacement.

The D.C. Circuit Court’s opinion in the case is expected to come out near the end of this year or early next year, according to David Doniger of the Natural Resources Defense Council, which supports the plan.

Whichever way it goes, the stakes are high. As Brett Kavanaugh, one of the D.C. court’s most outspoken judges during the arguments, said, “This is a huge case.”