Only the federal government can determine whether a person is in the United States legally, U.S. District Judge Sam A. Lindsay wrote Monday.
"The court recognizes that illegal immigration is a major problem in this country, and one who asserts otherwise ignores reality," the judge wrote. "The court also fully understands the frustration of cities attempting to address a national problem that the federal government should handle; however, such frustration, no matter how great, cannot serve as a basis to pass an ordinance that conflicts with federal law."
The ordinance, which voters approved this month, requires managers to verify that renters are U.S. citizens or legal immigrants before leasing to them, with some exceptions. Violators face fines of up to $500 a day.
Opponents had filed three requests in federal court for an injunction to stop its enforcement.
David Urias, and attorney for the Mexican American Legal Defense Education Fund (MALDEF), said the judge rightly found that the ordinance was pre-empted by federal law.
"It's clear that the judge is finding that Farmers Branch's attempts to enact this ordinance violates the Supremacy Clause of the United States because it's a regulation of immigration, and we're every pleased to see that from the judge," Uris told CBS News. The Supremacy Clause of the Constitution makes federal laws and U.S. treaties "the supreme law of the land."
Jim Bernard, an attorney representing apartment complexes, told CBS Station KTVT correspondent Jack Fink. "The city really had no business from the very beginning being in the business of regulating immigration."
Jose Galvez opposes the ordinance and calls the judge's ruling "a big victory."
"I think it's a new beginning, and we need to start making sure that Farmers Branch [remains] one city for everyone," he told KTVT.
"Well, we're certainly disappointed," City Councilmember Tim O'Hare, who originally proposed Ordinance 2903, told CBS Station KTVT correspondent Jack Fink. "We're disappointed that the judge chose to rule against the will of the people — the overwhelming will of the people — but you know what? We're going to fight this thing."
Even after the vote earlier this month, when the ordinance passed 67 percent to 32 percent, business owners and other opponents worked to get an injunction against the law taking effect.
O'Hare said then that the city would fight to keep the law. "We will defend it and we will seek attorney fees from every single person who sues us, and we will pursue that vigorously, I can guarantee you that," he told KTVT.
John Parish, a Dallas resident, supported the Farmer Branch ordinance.
"You know, what's legal and what's illegal is only what a judge or a jury decides in our whole system. So this is not a black-and-white case," he told KTVT.
Attorney Matthew Boyle, who represents Farmers Branch, said that regardless of the judge's decision, there is still plenty of work left on the case. He declined to elaborate.
Also Monday, activists filed a separate federal lawsuit against the city, claiming minorities are underrepresented on the city council.
The lawsuit was filed on behalf of three Hispanic voters who live in Farmers Branch.
The lawsuit seeks the creation of a system in which a city council member is elected to represent a specific section of the city. Activists said at least one Latino candidate would have been elected to the council if the system were in place.
Since 1970, Farmers Branch has changed from a small, predominantly white community with a declining population to a city of almost 28,000, about 37 percent of them Hispanic, according to the U.S. Census Bureau.
The city had not yet been served with the lawsuit, said Farmers Branch spokesman Tom Bryson.