Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal appeals panel ruled Thursday that Texas officials can resume enforcing a state law that makes it a felony to conceal undocumented immigrants from the government.

The controversial 2015 law had been on hold thanks to an injunction issued by a federal judge last year while a lawsuit filed by two San Antonio landlords and immigration advocates worked its way through the court system. Thursday's ruling lifted the injunction — which state officials had appealed — and dismissed the lawsuit.

Migrants at Sacred Heart Catholic Church's temporary shelter in McAllen, Texas, in 2014. Reuters - file

The three-judge panel of the 5th Circuit U.S. Court of Appeals in New Orleans said the landlords, David Cruz and Valentin Reyes, failed to prove that they faced a credible threat of prosecution under the law, which makes it a crime punishable by up to 10 years in prison to "harbor" immigrants with the intention of protecting them from immigration authorities.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Related: Immigrant Harboring Law: Activists Face Off With State of Texas in Federal Court

The suit by Cruz, Reyes and the immigrants' groups argued that the law improperly circumvented federal authority over immigration policy. It said the law is so broad that even renting a home to an undocumented immigrant could be found illegal.

But lawyers for Texas contended that the law doesn't forbid simply "sheltering" undocumented immigrants — it criminalizes intentionally "concealing" them "from detection," they said. Anyway, they argued, the law is really about smuggling, not immigration, and doesn't intrude on federal prerogatives.

The appeals panel agreed with Texas that Cruz and Valentin — who weren't renting to unauthorized immigrants in the first place — faced no threat of prosecution.

"There is no reasonable interpretation by which merely renting housing or providing social services to an illegal alien constitutes 'harboring ... that person from detection,'" U.S. Circuit Judge Jerry Smith wrote.

Texas Attorney General Ken Paxton welcomed the ruling, saying it would "allow the state to fight the smuggling of humans and illegal contraband by transnational gangs and perpetrators of organized crime, not just on the border, but throughout Texas."

Nina Perales, vice president for litigation for the Mexican American Legal Defense and Education Fund, which led the legal team that brought the lawsuit, said there was good news in the ruling for her side, too, because it found that "our clients are not harboring the undocumented immigrants that they serve."

"The Fifth Circuit provided us with a narrow definition of harboring that will prevent Texas law enforcement officers from arresting humanitarian workers and landlords for simply providing shelter and conducting business with undocumented immigrants," she said.