The states of North Dakota and Minnesota on Wednesday took their legal battle over coal-generated electricity to a federal appeals court in St. Paul and faced tough questions from the three-judge panel.

The case pits Minnesota regulators against the state of North Dakota and its utility and coal interests over a 2007 Minnesota law restricting new power generation from coal. North Dakota successfully argued in federal district court that the law illegally regulates out-of-state utilities in violation of the U.S. Constitution’s Commerce Clause.

Now, the Eighth U.S. Circuit Court of Appeals is reviewing an April district court ruling that enjoined Minnesota from enforcing key sections of the law. North Dakota interests say it hampers their ability to find buyers for power from existing coal-fired generating plants or to plan for new ones.

“We think the statute as it is enacted is unconstitutional — a violation of the Commerce Clause,” said North Dakota Attorney General Wayne Stenehjem, who attended the oral arguments, although another attorney addressed the court on behalf of his state.

The Commerce Clause is meant to bar states from interfering in interstate commerce.

Stenehjem, in an interview with the Star Tribune afterward, said he wouldn’t try to guess which way the court is leaning. Attorneys for both states faced questions from judges, who clearly had studied the lengthy pleadings filed by both sides and 31 outside groups as “friends of the court.”

“It is always hard to tell just based on the questions that are asked where a court might be going,” he added.

In a statement, Minnesota Commerce Commissioner Mike Rothman said: “I hope the federal appeals court will respect our state’s decision to choose to purchase clean, renewable energy resources rather than striking down the law, with the consequence that Minnesota utilities would be allowed to import electricity from new, polluting coal-fired power plants in other states.”

North Dakota, which relies on coal for 78 percent of its electricity, argued that the wording of Minnesota law makes illegal the sale of electricity in other states by large regional utilities that only partly serve Minnesota. When electricity is distributed on the regional power grid, North Dakota argued, its source is indistinguishable.

Alethea Huyser, an assistant Minnesota attorney general who argued before the appeals panel, said the state law “does not and could not” regulate the power grid. That quickly brought the first pointed inquiry from James Loken.

“Yes it does,” he said, pressing for response.

Minnesota contends that its Next Generation Energy Act regulates new coal-based electricity under contracts to import it into Minnesota and under utilities’ regulator-reviewed resource plans to serve Minnesota customers. Huyser said Minnesota regulators have never applied the law — and wouldn’t — in the broad, grid-restricting way suggested by North Dakota interests.

But Thomas Boyd, a Minneapolis attorney representing North Dakota’s side, said Minnesota is the only state with such a law, and it has hindered utilities like Minnkota Power Cooperative, a party to the case, from selling generating capacity at one of its coal power plants in North Dakota.

Boyd also said federal law, not state law, should govern interstate power sales. Referring to an unsuccessful effort to amend Minnesota’s law, he said: “The [Minnesota] Legislature recognized this is a bad law. Unfortunately, it is still on the books.”

But North Dakota’s case also got some scrutiny from the panel. Judge Steven Colloton wondered why utilities didn’t ask the Minnesota Public Utilities Commission (PUC) to interpret the law. Such regulatory decisions are part of the PUC’s mission, and can be appealed to the state Appeals Court, rather than to federal courts.

That regulatory process can be long and contentious — a concern raised by Boyd. But Huyser said a PUC decision would have taken “far less time than the four years” the lawsuit has lasted.

A written ruling from the three-judge panel is expected to take several more months. If Minnesota loses, the state potentially will have to pay North Dakota’s legal fees, which Stenehjem said already exceed $1 million.

The Minnesota Commerce Department and the PUC are the Minnesota parties in the suit, represented by the attorney general’s office. On the other side are the North Dakota Industrial Commission, three electric utilities, two coal companies and a trade group for lignite, the type of coal mined there.