ALBUQUERQUE — A federal judge on Friday temporarily halted plans by companies in New Mexico and Iowa to start slaughtering horses next week.

Judge Christina Armijo of Federal District Court issued a restraining order in a lawsuit brought by the Humane Society of the United States and other groups in a case that has set off an emotional national debate about how best to deal with the tens of thousands of unwanted and abandoned horses across the country.

Judge Armijo scheduled another hearing for Monday in the lawsuit. The move stops what would have been the resumption of horse slaughters for the first time in seven years in the United States.

The groups contend the Department of Agriculture failed to do the proper environmental studies before issuing permits that allowed the companies to open horse slaughterhouses, which they had said they planned to open as soon as Monday.