LINCOLN, Neb. — A Nebraska judge has declared unconstitutional a 2012 law that gave the governor and state environmental regulators the authority to approve oil pipeline routes, throwing yet another obstacle in the path of the proposed Keystone XL oil pipeline.

Attorney General Jon Bruning has already filed notice of his intent to appeal the ruling to the state Supreme Court.

Lancaster County District Judge Stephanie Stacy ruled in favor of three Nebraska landowners who filed a lawsuit against the state, issuing a 50-page order Wednesday concluding that under the state constitution, the state Public Service Commission has regulatory control over the routing of “common carriers” such as oil pipelines. The law shifted control to the Nebraska Department of Environmental Quality and the governor.

The ruling includes a permanent injunction preventing Gov. Dave Heineman and the DEQ from taking any further action to authorize or advance the pipeline under the law. Heineman released a statement saying, “I’m pleased that Attorney General Bruning is appealing this decision. This is an important issue for the state of Nebraska.”

The ruling further complicates the five-year fight over the pipeline being sought byTransCanada, a Canadian company that is also awaiting a decision by the Obama administration on a federal permit to build the pipeline across an international border. Pipeline fighters in Nebraska have long claimed TransCanada basically wrote the law that has been struck down.

David Domina, who represented the landowners, said in a press release, “The court’s action effectively rescinds Governor Heineman’s notification toPresident Barack Obama that Nebraska legal procedures had been satisfied.”

“Now, it is back to the drawing board for Governor Heineman and the Legislature,” said Domina, who is running for the U.S. Senate. “Under the court’s ruling, TransCanada has no approved route in Nebraska. TransCanada is not authorized to condemn the property against Nebraska landowners. The pipeline project is at standstill in this state.”

TransCanada has already revised its route through Nebraska once. TransCanada spokesman Shawn Howard said in a press statement that the company is disappointed and disagrees with the decision.

“We will now analyze the judgment and decide what next steps may be taken,” he said. “TransCanada continues to believe strongly in Keystone XL and the benefits it would provide to Americans — thousands of jobs and a secure supply of crude oil from a trusted neighbor in Canada.”

TransCanada has said in the past that it will continue securing easements in Nebraska, even though the siting process could drag out for years, with appeals.