The U.S. Commodity Futures Trading Commission didn't have the authority to "conduct a public interest review" that led it to block Kalshiex from listing political prediction markets in the U.S., a federal judge said in a formal opinion Thursday..

Judge Jia Cobb, of the District of Columbia, published her long-anticipated opinion nearly a week after ruling in Kalshi's favor in its lawsuit against the CFTC. The judge wrote that Congress had revoked the CFTC's ability to conduct public interest reviews of certain proposed derivative contracts, unless they fit within certain buckets, like terrorism or gaming.

The opinion comes as the CFTC is considering a proposal to ban all exchanges on its watch from listing political prediction markets.

Although Kalshi won the case, it remains unclear how soon the company can list election markets. The CFTC has filed an emergency motion asking the judge to stay her order while the agency figures out whether to appeal. A hearing on that motion is scheduled to take place Thursday at 10:30 a.m. Eastern time (14:30 UTC).

Read more: U.S. Election Betting: What's at Stake in Final (?) CFTC-Kalshi Showdown

The CFTC has argued for several months now that political prediction markets fall under the "gaming" category, including in its proposal to ban them in the U.S. outright. In the Kalshi case, the judge disagreed.

"The CFTC’s order exceeded its statutory authority. Kalshi’s contracts do not involve unlawful activity or gaming," the judge wrote. "They involve elections, which are neither."

The judge cited the Supreme Court's Loper Bright ruling that overturned the previous Chevron deference precedent, in explaining how she came by her order.

Much of the judge's ruling walks through how she interpreted Congress's intent in modifying the Commodity Exchange Act, including how it and the CFTC defined words like "involves" and "gaming."

The CFTC defined "gaming" as something that could include "gambling," which in turn involves making wagers, the judge noted.

But, this logic could let the CFTC review any event contract where people put money on an outcome, which the Commodity Exchange Act already prevents it from doing, the judge said.

Judge Cobb said Kalshi's proposed contracts – which would let users take positions on which major political party might control each house of Congress at a given time – do not involve "unlawful activity or gaming," which alone is sufficient to overturn the CFTC's rejection of Kalshi's contracts – and the judge can't consider if there's a public interest angle as a result.

"That question involves (relates to, entails, has as its essential feature, or any other iteration of the word) elections, politics, Congress, and party control; but nothing that any Party to this litigation has identified as illegal or unlawful activity," the judge wrote. "Nor does that question bear any relation to any game – played for stakes or otherwise."

She emphasized that this decision was based on law, not policy preferences.

"Although the Court acknowledges the CFTC’s concern that allowing the public to trade on the outcome of elections threatens the public interest, this Court has no occasion to consider that argument," the judge wrote. "This case is not about whether the Court likes Kalshi’s product or thinks trading it is a good idea. The Court’s only task is to determine what Congress did, not what it could do or should do. And Congress did not authorize the CFTC to conduct the public interest review it conducted here."