Updated

A judge on Wednesday blocked construction of a $59 million irrigation dam because of the potential threat to an ancient fish species in Montana's Yellowstone River just three months after he lifted a previous injunction on the project.

In his order reinstating the injunction, U.S. District Judge Brian Morris wrote that the U.S. Army Corps of Engineers' new analysis of the proposed dam and a separate channel to allow pallid sturgeon to swim around the dam likely violated federal environmental laws.

The long-snouted pallid sturgeon, which evolved from fish that were alive in the age of dinosaurs, are cut off from their spawning grounds by a wood-and-rock irrigation dam in eastern Montana. They now number about 125 wild fish, and U.S. government officials have acknowledged that the species could go extinct if action isn't taken.

Their solution was to propose the new dam and a bypass channel for the fish, a project expected to take between two and three years to build.

THREE MILE ISLAND TELLS REGULATORS OF INTENT TO CLOSE

Two wildlife and conservation groups successfully sued to block the project in 2015, arguing that there was no evidence that the fish would use the proposed bypass channel. They want the government to remove the existing dam and have a free-flowing Yellowstone River that will allow the pallid sturgeon to spawn without manmade obstacles.

In April, Morris allowed the dam project to proceed after the Corps, the U.S. Bureau of Reclamation and the U.S. Fish and Wildlife Service conducted a more in-depth review of the dam and fish channel on the sturgeon than their original analysis.

Defenders of Wildlife and Natural Resource Defense Council filed new claims that even the in-depth government review fell short of the requirements of the Endangered Species Act and the National Environmental Protection Act.

Morris agreed. In his order, the judge noted that the U.S. government estimated about 41 percent of the fish would use the bypass channel, but didn't analyze what effect those low numbers would have on the overall population.

EXTREME HEAT MAKING WILDFIRE BATTLE TOUGHER IN SOUTHWEST

Government officials also couldn't demonstrate that the project would "improve a situation that they concede to be dire," Morris wrote.

montana 1

FILE - In this 2014 file photo, from left, Montana Fish, Wildlife and Parks employees Dave Fuller, Chris Wesolek, and Matt Rugg release a pallid sturgeon after taking blood samples from the fish in Montana. A judge on Wednesday, July 5, 2017, blocked a proposed $59 million irrigation dam because of the potential threat to the ancient fish species in the Yellowstone River. (James Woodcock/The Billings Gazette via AP, File)

Corps spokeswoman Jamie Danesi did not immediately respond to an email for comment. She and other Corps officials previously said the project is the best solution for the pallid sturgeon and the landowners who rely on the irrigation dam.

Aaron Hall, Defenders of Wildlife's Rockies and Plains representative, said the pallid sturgeon can't wait a decade on construction and analysis to determine whether the bypass works.

"Like the government, we agree that this is a time-sensitive matter," he said. "We really feel like there's a win-win solution here that we would love to get to."