SAN DIEGO — President Trump on Tuesday eagerly inspected eight towering prototypes for his long-sought wall at the US-Mexico border and accused California of putting ‘‘the entire nation at risk’’ by refusing to take tough action against illegal immigration.
Trump, making his first trip to California as president, said he preferred a fully concrete wall because it was the hardest to climb, but he noted it needs to be see-through. He said the first thing he noticed on the drive to the border was the number of patched-up holes in part of the existing fence.
‘‘We have a lousy wall over here now, but at least it stops 90, 95 percent,’’ Trump said. ‘‘When we put up the real wall, we’re going to stop 99 percent. Maybe more than that.’’
Trump’s visit was greeted with protests by demonstrators for and against his planned wall. The trip came amid an escalating battle between his administration and the state, which has refused to help federal agents detain immigrants in the United States illegally.
The president renewed his criticism of Democratic Governor Jerry Brown, saying he was presiding over sky-high tax rates and that the state’s sanctuary policies ‘‘put the entire nation at risk.’’
‘‘They’re the best friend of the criminal,’’ Trump said. ‘‘That’s what exactly is happening. The criminals take refuge in these sanctuary cities, and it’s very dangerous for our police and enforcement folks.’’
The Justice Department last week sued to block a trio of California laws designed to protect people living in the country illegally. Brown accused US Attorney General Jeff Sessions of ‘‘going to war’’ with California to appease Trump.
After leaving the border, Trump basked in the cheers of Marines in Miramar, pointing to his work to build up the military. He suggested there may someday be a ‘‘space force’’ fighting alongside the nation’s military branches.
Referencing his 2016 campaign against Hillary Clinton — who received 4 million more votes than Trump in California — the president vowed that ‘‘very soon we’re going to Mars’’ and said the nation would not be seeking to explore the red planet had his opponent won.
Trump later attended a fund-raiser in Los Angeles, where he was to stay overnight.
Demonstrations were held at the San Ysidro port of entry in San Diego, the nation’s busiest border crossing, where protesters chanted ‘‘No ban! No wall!’’ as honking drivers cheered them on. Protests were also held on the Mexican side.
At San Ysidro, Jose Gonzalez, 21, stopped to snap a photo of the protesters holding signs, including one that read: ‘‘Wall off Putin!’’ in reference to Russian President Vladimir Putin, who has a seemingly close relationship with Trump. ‘‘I don’t think it’s really fair how he has the choice to separate us,’’ said Gonzalez, a dual citizen who lives in Tijuana and crosses the border daily to work at a San Diego ramen restaurant.
Army veteran Mark Prieto, 48, shook his head. ‘‘People are so narrow-minded,’’ the Riverside firefighter said. ‘‘Finally we have someone who is putting America first.’’ His wife, Corina Prieto, a nurse who has extended family in Mexico, agreed. Both voted for Trump.
‘‘I think he is doing a lot of good, like protecting our Border Patrol,’’ she said.
Trump was to be briefed on lessons learned in the construction of the wall prototypes, built in San Diego last fall. He was also to meet with border officers to ask what they need, Homeland Security spokesman Jonathan Hoffman said.
San Diego’s Republican mayor criticized Trump’s short visit, saying the president won’t get a full picture of the city. Kevin Faulconer said a popular cross-border airport terminal connecting San Diego and Tijuana shows that ‘‘building bridges has worked wonders.’’
Faulconer, writing in The San Diego Union-Tribune, also said San Diego police work to protect everyone regardless of immigration status, an apparent dig at Trump’s agenda.
Trump tweeted about California as he flew to the state.
‘‘California’s sanctuary policies are illegal and unconstitutional and put the safety and security of our entire nation at risk. Thousands of dangerous & violent criminal aliens are released as a result of sanctuary policies, set free to prey on innocent Americans. THIS MUST STOP!’’ he wrote.