Even as immigrant advocates applauded a federal court ruling that limits local efforts to target people in the country illegally, some Frederick County officials insisted that they should continue to play a role in deporting them.

The 4th U.S. Circuit Court of Appeals ruling this week revives a lawsuit stemming from the detention and arrest by Frederick County sheriff's deputies of a Salvadoran woman as she sat on a curb eating a sandwich in October 2008.

The court ruled that state and local law enforcement can't detain or arrest people solely based on their immigration status.

Frederick County commissioners passed a resolution Thursday in support of the sheriff's department, said commission President Blaine Young, who wants to make his county Maryland's "most unfriendly to illegal aliens." He vowed that county officials would continue to enforce immigration laws to the extent they can.

"If the federal government thinks we're doing it incorrectly, the federal government can take our credentials any time they want," Young said.

Sheriff Chuck Jenkins has made a national name for his efforts against illegal immigration. Under his leadership, Frederick County in 2008 became the only Maryland jurisdiction to sign on to a federal program that allows local law enforcement to research immigration information. Hundreds of people in the country illegally in Frederick County have been deported since then.

Jenkins, twice elected on an anti-illegal immigration platform, declined to comment. He said through a spokeswoman that he had not yet fully analyzed the significance of the appellate court ruling.

Legal experts said this week's ruling further clarifies how far state and local governments can go in enforcing immigration policies.

"We hold that, absent express direction or authorization by federal officials, state and local law enforcement officers may not detain or arrest an individual solely based on known or suspected civil violations of federal immigration law," the ruling stated.

Roxana Santos sued Frederick County and Jenkins, alleging violations of the Fourth Amendment right against illegal search and seizure. A lower court dismissed the lawsuit, but the appeals court found that Santos' arrest was illegal. The latest ruling means the suit can go forward, though the court limited the scope by determining that some defendants can't be sued in their individual capacities.

Two deputies approached Santos while she ate lunch before her shift as a dishwasher began. The deputies discovered she had a civil warrant for an immigration violation and arrested her. Santos eventually spent 45 days in jail.

National immigration advocacy groups took her case, accusing the county and sheriff's deputies of profiling Santos and acting outside their authority for arresting her when she had not been implicated in a crime.

"They were out looking for brown people who look Latina and were arresting them," said Jose Perez, deputy general counsel of LatinoJustice. Perez said Jenkins should see that the ruling "ties his hands and makes clear that this is illegal."

Kim Propeack, legal director of the CASA de Maryland immigrant advocacy group, said she hopes the ruling "sends a message to the other states and jurisdictions in Maryland that it is a real mistake" to endorse local enforcement of federal immigration laws.

Illegal immigration has been a divisive issue in Frederick. Pro-immigrant groups have held rallies to speak out against local policies.

It has even split families. Blaine Young's father, a Democrat and state senator, doesn't share his son's views and points out only a slim majority of the county residents voted in 2012 against upholding the state law that grants in-state tuition to some students in the country illegally.

"We've got to stop running them down," Sen. Ron Young said. "We need to deal with the immigration issue differently. … It's pretty apparent from the ruling what they can and can't do now. And all of law enforcement have to abide by it, whether they like or not."

Frederick County Commissioner C. Paul Smith, an attorney, played down the significance of the appellate court ruling and its likely effect on county efforts to address immigration on a local level.

"There was some new ground that was plowed," said Smith, a Republican. "Whoops, it just turns out you can't arrest someone on a civil warrant."

Smith said many residents feel people in the country illegally drain public resources, and he wished all local jurisdictions in Maryland actively enforced immigration laws.