A federal judge on Thursday struck down the city of Hazleton's tough crackdown on illegal immigrants, ruling unconstitutional a law that has been emulated by towns and cities around the nation.

The Illegal Immigration Relief Act sought to impose fines on landlords who rent to illegal immigrants and deny business permits to companies that give them jobs. Another measure would have required tenants to register with City Hall and pay for a rental permit.

It was pushed by Hazleton's Republican mayor last summer after two illegal immigrants were charged in a fatal shooting.

Hispanic groups and illegal immigrants sued in federal court to overturn the measures, saying they usurp the federal government's exclusive power to regulate immigration, deprive residents of their constitutional rights to equal protection and due process, and violate state and federal housing law.

Click here for FOXNews.com's Immigration center.

More than 90 communities across the U.S., frustrated by the Congressional impasse on dealing with illegal immigrants, have considered or approved measures similar to Hazleton's. U.S. District Judge James Munley's ruling does not affect those measures.

Mayor Lou Barletta, chief proponent of the crackdown, contends illegal immigrants have brought drugs, crime and gangs to the city of more than 30,000, overwhelming police, schools and hospitals.

Hispanic immigrants began settling in large numbers in Hazleton several years ago, lured from New York, Philadelphia and other cities by the city's cheap housing, low crime and the availability of work in nearby factories and farms. The city, situated 80 miles northwest of Philadelphia, estimates its population increased by more than 10,000 between 2000 and 2006.

Testimony during the nine-day trial pegged the city's illegal immigrant population at between 1,500 and 3,400.

Click here for FOXNews.com's Immigration center.