FARMERS BRANCH, Texas (AP) — A Dallas suburb's ban on apartment rentals to illegal immigrants, an ordinance passed by city leaders and later endorsed in a vote by its residents, is unconstitutional, a federal judge found Wednesday.

Only the federal government can regulate immigration, U.S. District Judge Sam A. Lindsay concluded in his decision.

The city didn't defer to the federal government on the matter, violating the supremacy clause of the U.S. Constitution, which allows for the federal government to pre-empt local laws, Lindsay said.