Immigration — particularly the diabolical saga at the U.S.-Mexico border, with children being taken from their parents' arms and placed in detention camps — has dominated local, national and international news coverage for weeks.

But here in California we are having our own immigration-based battles with the Trump administration in the courtroom, where a federal judge recently handed down rulings for and against the Golden State’s longtime position as a sanctuary city for undocumented immigrants.

Keeping immigrants from “invading” the United States and invoking the notorious El Salvadoran gang MS-13 as a catch-all term for people immigrating from the south has been President Donald Trump’s calling card since his election and well into his second year in the White House. While the president tweets about “bad hombres” heading north to the United States, his Justice Department has taken the fight to states that have declared a safe haven for undocumented people, with a focus on California.

U.S. District Court Judge John Mendez, an appointee of President George W. Bush, ruled in favor of the Trump administration’s request to block a part of state law that allowed California to fine employers who cooperated voluntarily with U.S. Immigration and Customs agents by allowing them access to their workplace without notifying their employees.

Under California law, employers could been fined up to $10,000 for sharing information about their employees.

Mendez’s ruling allows ICE agents to enter a workplace without a warrant and means that employers will no longer face the possibility of being fined. The ruling still allows employers to warn their workers of imminent visits from immigration agents.

But in a serious blow to the U.S. Justice Department headed by Attorney Gen. Jeff Sessions, Mendez rejected the government’s request to stop a state law that limits the type of information that can be shared with immigration authorities. In addition, the judge ruled in favor of continuing a law that grants California authorities the right to have access to pertinent information about where detainees are held, be they in private or local jails.

In political terms, the ruling might be seen in some corners as a win for state Sen. Kevin DeLeón (D-Los Angeles). as Mendez upheld a bill that he sponsored last year, Senate Bill 54. The law essentially cemented California as a sanctuary city by prohibiting local law enforcement agencies from detaining immigrants without documentation based on their immigration status and from sharing information with federal immigration authorities.

Passed by the state Legislature last year, SB54 — also known as the California Values Act — was California’s answer to Trump’s vow to eliminate sanctuary cities and deny them federal grants if they did not relinquish that status.

Legal attempts to defund states where sanctuary cities exist have been rejected multiple times by federal judges in 2017 and this year.

“It’s another stunning defeat for Trump in the courts and an overwhelming victory for the rule of law,” De León, who is running against Sen. Dianne Feinstein for the U.S. Senate, tweeted after the ruling.

Mendez appeared to suggest that partisan politicking was behind the government’s demands. “There is no place for politics in our judicial system, and this one opinion will neither define nor solve the complicated immigration issues currently facing our nation,” the judge wrote in his July 4 opinion.

Los Angeles Mayor Eric Garcetti, former Los Angeles police chief Charlie Beck and the Los Angeles City Council have supported the tenets of sanctuary cities, including not using police as de facto immigration officials by actively seeking out undocumented immigrants.

City Atty. Michael Feuer said the ruling “preserves trust and rejects fear.”

Feuer’s office filed an amicus brief supporting California’s position on sanctuary cities. “SB54 is based on the same principles that ground Los Angeles' policing strategies — strategies that encourage all residents, regardless of immigration status, to report crimes and cooperate with LAPD,” the city attorney said in a statement after the ruling. “We in Los Angeles were proud to file a brief supporting the state's position in this important case.”

Not all Southern California cities are in step with Los Angeles on sanctuary cities.

Newport Beach, Huntington Beach, Los Alamitos, Orange, Mission Viejo, Aliso Viejo, Yorba Linda, Fountain Valley and San Juan Capistrano have all passed resolutions protesting SB54.

In California, immigration has long been a hot-button topic. Some political observers chart the once-purple state’s transition to dark blue after the infamous Proposition 187, a 1994 ballot measure that sought to deny undocumented immigrants non-emergency health care, education and other basic services. It passed overwhelmingly and helped sweep an unpopular Republican Gov. Pete Wilson into a second term but turned the rapidly growing Latino population against the Republican Party.

In an interview with the Los Angeles Times last year, Wilson, an unabashed backer who arguably became the face of what many Latino leaders called a blatantly racist political campaign, said he would support the initiative all over again.

“I’m not going to shrink from combat if, to avoid it, you've got to avoid doing what you know to be needed,” said the former Marine.

Proposition 187 was  ruled unconstitutional in 1999 by a federal district court.

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.