LOS ALAMITOS, Calif. (AP) - The heated battle over immigration exploded in a small Southern California city as elected officials took steps to opt out of a state law limiting cooperation between police and federal deportation agents.

Residents in the tight-knit Orange County community of Los Alamitos packed the City Council chambers Monday night as leaders voted 4-1 in favor of a measure to declare the city exempt from California's so-called sanctuary law, citing constitutional concerns.

The move in the city of 12,000 mostly American-born residents has stoked intense passions among those opposed to illegal immigration and those who think local police should focus on crime-fighting, not deportation.

In this Monday, March 19, 2018 image made from video provided by KABC-7 councilmembers listen during a meeting in Los Alamitos, Calif. Leaders of the small California city in Orange County have given preliminary approval to a measure to exempt the city from a state law that limits cooperation between local police and federal immigration agents. Councilmembers voted 4-1 Monday night in favor of an ordinance to opt out of California's law, citing constitutional concerns. A required second vote is expected on April 16. (KABC-7 via AP)

Longtime resident and former Mayor Gerri Mejia urged council members to pass the measure, which requires a second vote to take effect. Another meeting is expected April 16.

"This is simply just to protect us from those who might cause us harm," she said.

The vote in the community 20 miles (32 kilometers) southeast of downtown Los Angeles comes less than two weeks after U.S. Attorney General Jeff Sessions sued California over the state's law barring police in many cases from turning suspects over to federal agents for deportation.

California's largely Democratic leaders have vowed to defend the law, which passed last year in response to stepped-up deportations by the Trump administration.

Los Alamitos Mayor Troy Edgar said police have not raised concerns about California's law. But he said he gets an earful from residents about the state's intrusion into local governing and felt his city should take a stand.

"It's just kind of hit a boiling point for us," Edgar said.

Stephanie Tellez, a teacher and longtime resident, said she does not want the children of immigrants in her city to live in fear of their parents being deported and does not want her tax dollars spent on costly litigation.

"This process is not logical for such a small city," she told the council.

Immigrant advocates, including the American Civil Liberties Union of Southern California, said Los Alamitos must follow state law and will be sued if the measure passes.

"State law is not a recommendation," said Emi MacLean, staff attorney at the National Day Laborer Organizing Network. "It is not optional."

Aaron Caplan, a professor at Loyola Law School in Los Angeles, largely agreed. He said a city can adopt its own measures but should expect to defend them in court.

"They can't opt out of state law and automatically win," he said.

In Los Alamitos, many residents asked why the city wanted to jump into the already heated fight over immigration and urged leaders to let state and federal officials hash it out in court.

Republicans outnumber Democrats in Los Alamitos, but like many Orange County communities, the city narrowly voted for Hillary Clinton in the 2016 presidential election over Donald Trump, voting data shows.

If the measure passes, it isn't entirely clear how it will affect daily life in the city known for its strong public schools and a U.S. military base.

The vast majority of residents - 86 percent - were born in the United States. Most of those who came from other countries have become naturalized U.S. citizens, according to U.S. Census Bureau data.

But Los Alamitos is surrounded by larger and more diverse communities that are home to more immigrants, and visitors are drawn to the area by a nearby horse racetrack.

While the city is spread across bustling avenues and near a freeway, some shops retain an old-town feel. The local chamber of commerce has offices in a cottage, and an old-fashioned barbershop is across the street.

Tony Cobian, who owns a local diner, said many people in the community know one another and try to help others out. The 22-year-old doesn't see why the state and federal government, and now the city, are sparring over immigration.

"I think the government needs to get itself together and agree," Cobian said. "We should be like this little community - small and united."