SACRAMENTO, Calif. (CN) – A federal judge on Thursday denied the Trump administration’s bid to erase a cap-and-trade agreement between California and the Canadian province of Quebec, finding the deal is voluntary and far from a treaty.

Earlier this week, the federal government argued in court the lucrative carbon trading system interferes with President Donald Trump’s ability to conduct foreign policy on greenhouse gas emissions and other environmental deals. In its lawsuit, the Trump administration accused California of trying to set its own foreign policy by arranging the nonbinding deal with Quebec.

“There is no ‘mutual government’ or ‘cession of sovereignty’ representative of a treaty,” U.S. District Judge William Shubb reacted in a 33-page ruling Thursday.

The Trump administration sued California and various state officials in October 2019 over the Quebec agreement, adding another notch in the parties’ lengthy list of legal fights.

During a marathon session in Sacramento federal court on Monday, U.S. Deputy Assistant Attorney General Jonathan Brightbill claimed California was “acting in foreign affairs” and urged summary judgment on two of the federal government’s four causes of action.

Brightbill said the cap-and-trade agreement amounts to an emissions treaty and therefore requires congressional approval because it involves political cooperation between California and a foreign government.

“This was California’s Field of Dreams; they built it with consultation with foreign governments,” Brightbill said.

He added that if allowed to stand, California’s deal could encourage other states to enter similar arrangements with foreign governments. He argued the deal takes away Trump’s ability to negotiate international emissions treaties in wake of the president’s decision to pull the U.S. from the Paris climate agreement.

California’s attorney countered the agreement had nothing to do with the federal government and noted it was enacted four years before Trump took office.

“The agreement is simply about consultation and collaboration,” said Elaine Meckenstock, California deputy attorney general. “There’s no transfer of authority or sovereign power, and it’s not binding.”

The state’s argument obviously resonated with Judge Shubb, who proclaimed during Monday’s hearing he hadn’t “decided the case yet.”

The George H.W. Bush appointee squashed Brightbill’s attempt to cast California’s renewal of the cap-and-trade deal as political retribution for Trump’s decision to back out of the Paris agreement. He called the feds’ argument “political hyperbole.”

“The United States submitted a number of statements from former Gov. [Jerry] Brown to describe California’s response to President Trump’s withdrawal from the Paris Accord and this lawsuit,” Shubb said in a footnote in Thursday’s ruling. “The court recognizes these as no more than typical political hyperbole. As such, they are entitled to no legal effect.”

Shubb, 81, noted that “only a handful” of U.S. Supreme Court cases have delved into the actual meaning of the Constitution’s Treaty Clause, but nonetheless denied the Trump administration’s motions for summary judgment and granted the defendants’ cross-motions.

“This agreement is not a treaty creating an alliance for purposes of peace and war,” Shubb wrote. “To the contrary, the agreement explicitly recognizes that Quebec and California adopted ‘their own greenhouse gas emissions reduction targets, their own regulation on greenhouse gas emissions reporting programs and their own regulation(s) on their cap-and-trade programs.”

The U.S. Department of Justice didn’t immediately respond to a request for comment on the ruling. A spokesperson for the California Air Resources Board had no comment to offer.

Approved in 2013 and renewed in 2017, California and Quebec voluntarily linked their respective cap-and-trade programs in hopes of making them more attractive to businesses. The states claim the deal boosts the ability for businesses to buy and sell so-called carbon allowances across boundaries and, in turn, make the programs better smog fighters.

While Thursday’s order is certainly a win for California and the assorted environmental groups that have intervened to fight what Gov. Gavin Newsom considers to be “political retribution,” there will likely be further arguments on the feds’ remaining causes of action.

“Because the parties did not move for summary judgment on the Foreign Affairs Doctrine or the Foreign Commerce Clause, the court expresses no opinion on the merits of those claims in this order,” Shubb noted.