The U.S. Court of Appeals for the 5th Circuit upheld a lower court’s ruling this week enjoining a law enacted in Farmers Branch, Texas, that bars undocumented immigrants from renting housing in the city and revokes the licenses of landlords who knowingly rent to them. The restrictive law, which passed in 2008, was struck down two years ago by U.S. District Judge Jane J. Boyle, who found the law to be unconstitutional.

In its ruling this week, the appeals court found the Farmers Branch law to be discriminatory since it “excludes” undocumented immigrants, “particularly Latinos, under the guides of policing housing.” The court opined:

“Because the sole purpose and effect of this ordinance is to target the presence of illegal aliens within the City of Farmers Branch and to cause their removal, it contravenes the federal government’s exclusive authority over the regulation of immigration and the conditions of residence in this country.”

The mayor of Farmers Branch, Bill Glancy, who supports the law, said he will confer with City Council members before deciding whether the city should take the matter before the U.S. Supreme Court or a full appeals court.

The appeals court ruling also maintains the lower court’s decision that the city must pay the plantiffs $2 million in attorneys fees. Last month, a federal judge in Nebraska also struck down a restrictive immigration housing measure, finding the law to be “discriminatory in violation of federal law.”