A federal judge has blocked the Bureau of Land Management from moving forward with a controversial plan to spay wild mares in Hines, Oregon.

U.S. District Court Judge Michael W. Mosman issued a preliminary injunction Friday that effectively stops the BLM from surgically removing the ovaries of wild mares located in the Warm Springs Management Area. The injunction is in effect until the court reaches a final decision in a lawsuit filed by animal rights groups who argue the procedure is inhumane.

“Hopefully, BLM will rethink their decision to move forward with the most inhumane and impractical management tool imaginable,” said Ginger Kathrens, executive director of The Cloud Foundation and a plaintiff in the lawsuit, in a press release.

“For decades, humane fertility vaccines have been available and, where used, have been successful. Unfortunately, BLM has resisted getting out on the range and using them. Now is the time for the agency to change course,” Kathrens said.

Plans to spay wild horses in Oregon stemmed from concerns at the BLM over overpopulation on public lands.

In a 2016 report to Congress, the BLM said wild horse and burro populations reached levels “far exceeding what is healthy for the land and the animals.”

That same year, BLM announced it wanted to begin research to “develop and evaluate safe and humane methods to spay wild horse mares as a method for managing the growth of wild horse herds on public lands.” Animal rights groups filed a similar lawsuit then, effectively stopping the BLM from proceeding.

The latest lawsuit came after the BLM approved a plan to move forward with a spay study in September of this year.

The BLM has said it has legal authority under the Wild-Free Roaming Horses and Burros Act of 1971 to manage populations of horses on public land. In early October, the agency began rounding up wild horses at the Warm Springs Herd Management Area to begin research through a spaying procedure known as a ovariectomy via colpotomy to remove mares’ ovaries. The BLM removed 652 wild horses by Oct. 23, and procedures were scheduled to begin early November.

Animal rights groups have argued the procedure is inhumane, urging the BLM to consider other forms of population management. The Animal Welfare Institute cited research from the National Academy of Sciences, which it says advised against the procedure because of associated health risks.

“Today’s ruling is a decisive victory for animal welfare and for the American people, who not only cherish wild horses but have a First Amendment right to understand how the federal government is treating and managing these herds on public lands,” said Joanna Grossman, equine program manager with the Animal Welfare Institute, another plaintiff in the lawsuit.