(CNN) -- A pair of illegal immigration ordinances in Hazleton, Pennsylvania, were ruled unconstitutional Thursday by a federal appeals court.
In 2006, Hazleton passed the Illegal Immigration Relief Act Ordinance, which would have fined landlords who rented to undocumented immigrants and would have penalized companies that employed them.
Under another law, tenants would have had to prove they were citizens or lawful residents, register with the city and pay for a rental permit in order to receive an occupancy permit.
The ordinances were copied by other cities.
Both were challenged before going into effect and found unconstitutional in 2007 by a U.S. District Court. The court ruled that Hazleton cannot enact any ordinances dealing with illegal immigration because they conflict with the supremacy clause of the U.S. constitution.
"Today's decision makes the Third Circuit the most liberal court in America on immigration issues," said a statement from Lou Barletta, Hazelton's mayor. "This ruling is a loss for Hazleton and its legal residents."
But the American Civil Liberties Union called the decision by the 3rd Circuit Court of Appeals in Philadelphia, Pennsylvania, "a major victory in the fight against state and local anti-immigration."
Hazelton attorney Kris Kobach said the city will appeal the case and is ready to take it all the way to the U.S. Supreme Court, if necessary.