BILLINGS, Mont. (AP) — A U.S. magistrate judge has declared unconstitutional two Montana laws that sought to prevent the closure of a coal-fired power plant by subjecting its out-of-state owners to steep fines if they wouldn’t pay long-term maintenance and operating costs.

U.S. Magistrate Judge Kathleen DeSoto said the state measures violated free commerce provisions in the U.S. Constitution and federal laws intended to keep states from interfering in private agreements, The Billings Gazette reported.

Puget Sound Energy, Avista Corp., Portland General Electric and PacificCorp are majority owners of the Colstrip Power Plant in southeastern Montana. Their home states of Washington and Oregon are phasing out the use of coal-generated power over climate concerns — Washington in late 2025 and Oregon in early 2030.

The utilities have previously objected to paying for repairs to extend Colstrip’s life beyond when they can sell the power.

Talen Montana and NorthWestern Energy, which do not face coal-power bans, own the rest of the plant and want it to remain open.

The disputed laws were passed by the Republican-controlled Montana Legislature and signed into law by Gov. Greg Gianforte in 2021.

One law said if a co-owner refuses to share in the operating costs or takes actions that bring about the closure of an electrical generation facility without the consent of all the co-owners, it would be considered an “unfair or deceptive trade practice.” As such, Montana’s attorney general could issue fines of up to $100,000 per day.

The other law required any disagreements over the operation of the plant to be arbitrated in Montana.

Most of Colstrip’s power is used in Washington state.