SAN DIEGO, Calif. (Reuters) - U.S. President Donald Trump toured the U.S. border with Mexico on Tuesday and examined eight styles of walls, prototypes for the barrier he promised to build to keep out illegal immigrants and drugs.

The Republican president brought a tough message on immigration to California during his first visit as president to the heavily Democratic state that has served as a base of resistance to many of his policies.

Standing beside the prototypes, as U.S. border patrol agents rode nearby on horseback, Trump discussed the merits of various designs with border officials, his chief of staff John Kelly and Homeland Security Secretary Kirstjen Nielsen.

“The border wall is truly our first line of defense,” Trump told reporters.

Trump has asked the U.S. Congress for $18 billion to build the structure, but the funding has become ensnared in controversy over a host of immigration restrictions he and Republicans have proposed.

On the other side of the border, in Tijuana, Mexico, residents laughed off the idea that the monolithic slabs will stop desperate immigrants.

“The wall is just a waste of money. People will continue to cross, here, there, and everywhere,” said Salome Pacheco.

SANCTUARY CITIES

During his visit, Trump took aim at so-called “sanctuary cities” in California - local governments that refuse to cooperate with federal immigration officials seeking to deport illegal immigrants.

He renewed complaints that Los Angeles, San Francisco and other major cities are providing protection for illegal immigrants who have committed crimes.

At Marine Corps Air Station Miramar in San Diego, Trump said sanctuary cities nullify federal law and violate the U.S. Constitution.

“They shield criminals. You can’t do that,” he said.

Last week, Trump’s Justice Department filed a lawsuit accusing California of violating the U.S. Constitution and putting federal agents in danger by approving laws protecting illegal immigrants.

Slideshow ( 23 images )

California Democratic Governor Jerry Brown signed a bill into law last October that prevents police from inquiring about immigration status and curtails law enforcement cooperation with immigration officers.

Brown, who accuses the Trump administration of waging war on the country’s most populous state, has said the law was crafted with input and support from California police.

Trump also slammed Brown for high state taxes, saying Brown “has done a very poor job running California.”

Slideshow ( 23 images )

Ahead of the trip, an immigration official in Northern California resigned, accusing the Trump administration of making misleading statements about a four-day raid in February to arrest illegal immigrants in Oakland.

Attorney General Jeff Sessions said a public warning from Oakland’s mayor helped more than 800 people evade arrest. But James Schwab, who quit his job as regional spokesman for the U.S. Immigration and Customs Enforcement department, said he believed the number was much lower.

“I quit because I didn’t want to perpetuate misleading facts,” he told the San Francisco Chronicle newspaper.

After his San Diego stop, Trump will travel to Los Angeles to headline a political fundraiser in Beverly Hills. A Republican Party official said the fundraiser would net $5 million for Trump’s prospective 2020 re-election campaign and the Republican National Committee.