In its ruling Monday, the 5th U.S. Circuit Court of Appeals in New Orleans said the Farmers Branch ordinance infringed on the federal government's authority, The Dallas Morning News reported.
Monday's decision ended the Dallas suburb's second appeal to the court, which upheld a lower court ruling last year. The city sought a rehearing after the U.S. Supreme Court struck down parts of an Arizona law.
The appeals judges criticized Farmers Branch's ordinance, which would have required all renters to obtain licenses proving they were in the United States legally. They also criticized the plan to fine or revoke licenses of landlords who leased to immigrants lacking permits.
"The ordinance not only criminalizes occupancy of a rented apartment or single-family residence, but puts local officials in the impermissible position of arresting and detaining persons based on their immigration status without federal direction and supervision," the court said.
City officials said they were reviewing the decision and hadn't decided whether to appeal, the Morning News said.
Ana Reyes, the first Hispanic to serve the city's council, praised the ruling and said she wanted the city to drop the issue.
"The anti-immigration ordinance was outside of our local jurisdiction," she said. "It is unconstitutional. This issue has been extremely divisive and costly for the citizens of Farmers Branch. It's now time to move forward and reinvest our residents' hard-earned tax dollars back into our community."