The National Conference of State Legislatures tracks immigration legislation with a customized database and simple search terms: refugee, migrant, seasonal worker, alien, English-speaking,  and  naturalization, to name a few.

In 2005, those queries yielded 300 proposed laws and resolutions among the 50 states and Puerto Rico.

This year? An avalanche of 1,607, with 43 in Pennsylvania and 15 in New Jersey.

"Everybody is jumping in the game," said Ann Morse, who runs the conference's data collection from her office in Washington.

Pennsylvania Rep. Daryl Metcalfe (R., Butler), the state's most vocal critic of illegal immigration, said the record crop of bills "reflects the realization that the federal government has been AWOL for decades" on immigration regulation. "States have a responsibility to protect their citizens from the illegal-alien invasion."

Rudolph Garcia, chancellor of the Philadelphia Bar Association, thinks Metcalfe and lawmakers who follow his lead are way out of bounds.

"Vilifying immigrants has become all too common in state legislatures," he said. "They seem to forget that we all came from somewhere else, either directly or through earlier generations. We need to control our borders [by] effective regulation at the federal level, not a patchwork of state laws."

Growing tension between state lawmakers and the federal government over immigration enforcement will come to a head in 2012, when the U.S. Supreme Court takes up Arizona's 2010 omnibus law on illegal immigration, with a ruling expected before summer.

The law gives Arizona police, using "reasonable suspicion," the authority to stop people they believe are in the country illegally and to transfer undocumented people to federal Immigration and Customs Enforcement for likely deportation. Opponents of the law say it will lead to racial profiling.

At least three states - Alabama, South Carolina, and Utah - followed Arizona's lead with tough new laws this year. The Department of Justice filed lawsuits barring them. On Thursday, a federal district court in Charleston enjoined key provisions of the South Carolina law.

By Morse's count, states have enacted a total of 1,700 immigration-related laws and resolutions since 2005.

Generally, these laws sanction employers who hire unauthorized workers; regulate eligibility for drivers' licenses and student financial aid; demand proof of immigration status for public benefits; penalize people who harbor undocumented migrants; and require local police to act if they suspect someone they stop for another violation is here illegally.

Allowing states to make their own immigration laws, said Angela Kelley, vice president of the Center for American Progress, a liberal think tank in Washington, produces a divided country, "with some states holding out a welcome sign and others a no trespassing sign.

"We'd never permit states to print their own currency or make treaties with other nations," she said, "and also can't let them pursue policies that invite racial and ethnic discrimination."

Though the number of legislative bills hit an all-time high this year, Morse said, the number enacted as laws or adopted as resolutions actually dropped for the first time since 2008.

Immigration experts attribute the decline - from 346 in 2010 to 306 this year - to the sour economy and the backlash, mostly by Latino groups, against the most-restrictive states.

"There is frustration [at the state level] and it is understandable; the feds have failed to tackle a tough problem," said Kelley, who noted that payback from groups offended by "anti-immigrant measures" may be slowing the adoption of some laws. In a recent report, her organization estimated Arizona lost more than $140 million in direct spending after groups angry about its law canceled conventions.

Restrictions "rattle the states like an earthquake," tossing schools, businesses, and churches, she said. "Now lawmakers are rethinking whether it was smart to have triggered the quake."

To Metcalfe, the Obama administration's counterattacks on state laws are the main obstacles slowing passage of some laws this year.

"The Department of Justice ties them up in court," he said. "In hard economic times, it is a hard sell to get the leadership of the legislature, and the governor's office, to enact [laws] they know [will] be fought in the courts."

He said he was prepared to settle for half a loaf in the next legislative session when he pushes for adoption of a bill he sponsored that would mandate the use of E-Verify, the Internet federal database for determining employment eligibility.

The legislation will call for mandatory use of E-Verify by state contractors, not all employers.

"We can get the state contractors done," he said, "but I don't think we can get full-blown [employer participation] at this point. You move forward with what you can."

As president of the 265-member National Association of Immigration Judges, Dana Leigh Marks of San Francisco offers a perspective from outside the immigration-reform debate.

"While many people attribute the record number of state laws . . . to the failure of Congress to address comprehensive immigration reform," she said, "there is another aspect of this complex problem which is often overlooked: The failure to provide adequate funding so that the federal laws that we already have . . . can be enforced.

"The immigration courts are a perfect example of a system which is unable to operate as the law intended because of a chronic lack of resources."

People wait years for their day in court, she said, because there are not enough judges to hear these cases promptly.

"The logical first step would be to provide sufficient resources to give the current system a realistic chance of [success]," she said, "before embarking on the contentious task of rewriting current law."

Contact staff writer Michael Matza at 215-854-2541 or mmatza@phillynews.com.