Just hours before they were scheduled to go into effect, a federal judge blocked the city of Hazleton from enforcing two ordinances targeting illegal immigrants.

The measures, approved by City Council last month, would have imposed fines on landlords who rent to illegal immigrants and denied business permits to companies that give them jobs. They also would have required tenants to register with City Hall and pay for a rental permit. They were supposed to go into effect Wednesday.

U.S. District Judge James Munley on Tuesday ruled that landlords, tenants and businesses that cater to Hispanics faced "irreparable harm" from the laws and issued a temporary restraining order blocking their enforcement.

"We find it in the public interest to protect residents' access to homes, education, jobs and businesses," he wrote in a 13-page opinion.

The ordinances have put the city of Hazleton in the spotlight as towns, cities and states around the country grapple with growing illegal immigrant populations in the absence of any comprehensive immigration reform bill coming out of Washington.

Many immigrant groups have rallied in Hazleton in opposition of the measures. In the city's Hispanic business district, some shops have closed while others struggle to stay open.

Visit FOXNews.com's NEW! Immigration Center

Hispanic groups and the ACLU sued Hazleton on Monday, contending that the laws trample on the federal government's exclusive power to regulate immigration.

The plaintiffs include the Hazleton Hispanic Business Association, landlords, a restaurateur and several illegal immigrants facing eviction, including children who attend public schools.

Mayor Lou Barletta, who spearheaded the crackdown, has argued that illegal immigrants have brought an increase in drugs, crime and gangs to the city. The city's lawyers on Tuesday cited a 10 percent increase in crime between 2004 and 2005 as a reason why the ordinances should be enforced.

Munley, however, wrote that the city "offers only vague generalizations about the crime allegedly caused by illegal immigrants, but has nothing concrete to back up these claims." The city also failed to provide statistics on the number of illegal immigrants living in Hazleton, he wrote.

Furthermore, Munley wrote, the plaintiffs have a "reasonable probability" of getting the laws declared unconstitutional.

Hazleton's crackdown, which was announced in June, has spurred other towns to pass similar laws. Municipal officials view the Hazleton lawsuit and a similar one in Riverside, N.J., as test cases.

Witold J. Walczak, legal director of the ACLU of Pennsylvania, hailed Tuesday's decision as an important victory.

"I think what's important is the judge recognized that this ordinance has the potential to cause real harm by costing people their jobs, their houses and requiring children to leave schools," he said.

The judge's restraining order expires Nov. 14. He indicated that he will schedule a hearing on the ACLU's motion for a temporary injunction.

Barletta said he is convinced the courts will ultimately uphold the law. He noted his lawyers had only a few hours to prepare for Tuesday's hearing and said he is confident they will "prove our right to defend and protect our citizens."

"I'm not discouraged. They may have delayed enforcement for now, but this too shall pass," Barletta said Tuesday. "We have only begun to fight."

The Associated Press contributed to this report.