A state district judge issued a preliminary injunction Friday night against a horse-slaughter plant in New Mexico.

It was another setback, perhaps a fatal one, for Valley Meat Co., which for two years has been the target of lawsuits and heavy public opposition. The company wants to kill horses and sell the meat in foreign markets.

Judge Matthew Wilson of Santa Fe granted the injunction against the company. He accepted state Attorney General Gary King’s arguments that Valley Meat would harm the environment and contaminate the food chain.

Wilson’s ruling came after a confusing afternoon, in which he first issued an order saying he would hold a hearing on whether he should remove himself from the case because of challenges to his impartiality.

Lawyers for the slaughterhouse had filed an emergency motion asking Wilson to recuse himself. They said the judge had a conflict of interest that he failed to disclose, and that his Facebook page showed evidence of bias against Valley Meat Co.

Blair Dunn, a lawyer for Valley Meat Co., said Wilson had ties to King’s office but never mentioned them when hearing King’s lawsuit against the company.

“We learned [Friday] that Judge Wilson up until 2010 worked as a special assistant attorney general assigned to the New Mexico Human Services Department. It was inappropriate that he failed to disclose that,” Dunn said.

A few hours after Wilson said he would hold a recusal hearing on whether he should be on the case, he ruled against the slaughterhouse and for the attorney general.

Dunn said his next move would be to ask the New Mexico Supreme Court to remove Wilson from the case.

“We asked him nicely to recuse himself, but he’s never going to do it,” Dunn said. “The only remedy in this kind of situation is to go to the Supreme Court.”

Wilson, a Democrat, was appointed to the District Court bench in October by Republican Gov. Susana Martinez. The high-profile horse-slaughter lawsuit has been his most publicized case during his three months as a judge.

On Wilson’s Facebook page, which promotes his campaign for election to the bench, various public comments against Valley Meat Co. have been posted in the last two weeks. Dunn said a judge should not have allowed comments from the public on cases he is hearing.

Wilson could not be reached about his Facebook page or Dunn’s allegations.

One posting on Wilson’s Facebook page was from a woman in Pennsylvania. It said: “Implore you to not allow the needless slaughter of horses. PLS turn this down. It is disgusting and inhumane.”

In granting the preliminary injunction against Valley Meat Co., Wilson accepted all the arguments made by King’s legal team.

Wilson said that, unless he ruled against the slaughterhouse, “the state and its residents will suffer irreparable injury as a result of Valley Meat’s imminent, self-declared violations” of the water-quality and food acts.

Valley Meat is not operating. But King’s lawyers argued that the company intended to begin slaughtering horses even without a state-required sewage discharge system.

Dunn said in hearings before Wilson that the attorney general’s claims were not true.

Dunn said Valley Meat’s owner, Rick De Los Santos, would comply with all state and federal requirements, including sewage discharge. In fact, Dunn said, before King filed his lawsuit, the company was working with the state Environment Department to obtain a discharge permit or an acceptable pump-and-haul system.

Dunn said King’s lawsuit should have been thrown out by Wilson because the case was being reviewed administratively by the Environment Department. Moreover, Dunn argued that Wilson’s court had no jurisdiction over meat inspections or water-quality complaints.

No matter what happens in the state courts, Valley Meat and proposed horse-slaughter plants in Iowa and Missouri may never be able to open.

Congress has eliminated money from the federal budget for horse-meat inspectors. A similar budgetary maneuver in 2007 effectively closed U.S. horse-slaughter plants.

De Los Santos said the congressional cuts did not end horse slaughter. Rather, he said, American horses were simply exported to border countries and killed there.

About 158,000 U.S. horses were shipped to Mexico and Canada in 2012, mostly to slaughterhouses. De Los Santos said the export system meant horses live in pain and filth during transport to distant slaughterhouses.

Proponents of U.S. horse slaughter have included the Yakama cqtribe in Washington state. Its lawyer, John Boyd of Albuquerque, has argued that an explosion of wild horses was wrecking the environment and reducing elk and deer populations on tribal lands.

One of King’s main arguments against Valley Meat Co. was that horse meat could be tainted with drugs. King said New Mexico’s reputation would suffer globally if the state were the source of an unsafe food product.

Contact Milan Simonich at 986-3080 or msimonich@sfnewmexican.com. Follow him on Twitter @milansnmreport.