The U.S. Supreme Court on Monday rejected attempts by towns in Texas and Pennsylvania to revive local laws that cracked down on illegal immigration.

The high court has held since 2012 that immigration issues are largely a matter for federal agencies, not local governments, to regulate.

In doing so, the court left intact the appeals court rulings challenged by the towns of Farmers Branch, Texas, and Hazleton, Pa., and avoided wading into the divisive issue of immigration at a time in which reform efforts have stalled in the U.S. Congress.

Prompted by concerns that the federal government was not adequately enforcing immigration laws, officials in both towns enacted ordinances that, among other things, required tenants to provide identification that could later be verified with immigration authorities and penalized landlords from renting to undocumented immigrants.

The Hazleton ordinance also penalized employers for knowingly employing unlawful immigrants. Groups of tenants, landlords, employers and workers challenged the laws in court. They won in both cases, prompting the towns to seek Supreme Court review.

Omar Jadwat, lawyer of the ACLU's Immigration Rights Project, who successfully argued the case in the U.S. appeals court, said, “things look really different now than it did when we initiated this case.”

“Cities are not looking to go down the road that Hazleton went down," he added. "What we're seeing on the ground is much more that cities and states are looking at ways to integrate immigrants into their communities ... and not ways to exclude people or criminalize them," he said.

Immigrant advocates say that five out of six federal courts of appeals that have dealt with similar housing-related ordinances have held that they conflict with the federal government's role as the primary enforcer of immigration law.

Hazleton passed the first local laws in 2006 to address concerns over an influx of immigrants. The laws sought to fine landlords who rented to people living in the country illegally, deny business permits to companies that gave them jobs, and required prospective tenants to register with City Hall and pay for a rental permit. However, the laws were never enacted amid the court challenges.

Former Mayor Lou Barletta had pushed the measures after two people living in the country illegally were charged in a fatal shooting. He argued that those living in Hazelton illegally brought drugs and crime to the city, overwhelming police, schools and hospitals.

"In the end, I blame the federal government. If our immigration laws were enforced, localities would not be compelled to take matters into their own hands," Barletta said on Monday.

The last time the court decided a major immigration case was in 2012, when it partially upheld Arizona's immigration law. The previous year, the court upheld another Arizona law that penalizes businesses for hiring undocumented immigrants.

In April 2013, the court signaled a reluctance to get further involved in immigration when it declined to hear an appeal from Alabama seeking to revive a section of the state's immigration law that criminalized the harboring of undocumented immigrants.

Al Jazeera and wire services