WASHINGTON (AP) – A former Pennsylvania coal town and a Dallas suburb lost a lengthy battle to enact anti-immigrant laws Monday when the U.S. Supreme Court declined to hear their appeals.

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

The ruling Monday involved efforts by the city of Hazleton, in northeastern Pennsylvania, and Farmers Branch, Texas, to enforce housing and employment rules aimed at people in the country illegally, a strategy copied by dozens of other cities that faulted federal efforts to control immigration.

"I think 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," said lawyer Omar Jadwa of the ACLU's Immigration Rights Project, who successfully argued the case in the U.S. appeals court. "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."

Hazleton had 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, who led the charge, is now in Congress. He 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, a Republican, said in a statement Monday. "It's why I am firmly opposed to any legislation that hints at amnesty for illegal immigrants. ... Today's ruling will spur me to have an even louder voice."

Farmers Branch spent eight years and more than $6 million on lawsuits and other efforts to ban immigrants living in the country illegally from renting property.

The Dallas suburb of 27,000 has since elected a new mayor and elected its first Latina councilwoman, after reforming the electoral process. Mayor Bill Glancy said he was disappointed by the Supreme Court decision. Like Barletta, he felt city officials were trying to step in where the federal government had failed.

"Everybody seems to be interested in the status quo," Glancy said. "It's kind of frustrating, that you'd think people would want solutions to problems."

Glancy supports reforms to allow some legal immigrants and some of those living here illegally grants to become U.S. citizens, and wants Farmers Branch to remain an appealing place for people of diverse backgrounds, he said.

"The people are moving here because they feel like it's a city and a community that tries to stand up for the rule of law," Glancy said. "And that's what this case is all about: The rule of law."