Similar demonstrations are expected again. Protesters — and some supporters — are planning rallies in the San Diego area before the president’s visit on Tuesday. One group, Women’s March San Diego, is planning to erect a large sign in opposition to the border wall that the president would see from the air, should he fly in by helicopter. Another group, which calls itself San Diegans for Secure Borders, is planning a rally on Tuesday in support of the president’s immigration policies. Among those scheduled to attend, the group said, are “parents whose children were murdered by illegal aliens who crossed our unsecured border illegally to kill our citizens.”

Los Angeles is girding for protests as well, though demonstrators may be confused over where to go. The location of Mr. Trump’s fund-raiser, and where he is staying, has been kept secret. A spokeswoman for the Los Angeles Police Department, Officer Rosario Herrera, said no permits had been issued for major protests as of Monday morning, and that any road closings would be determined later in consultation with the Secret Service.

“We are prepared for anything that arises in the city of L.A.,” she said.

Indeed, California Democrats seem eager for Mr. Trump’s arrival: the state Democratic leader, Kevin de León, who is running for Senate, called for a demonstration even before Mr. Trump takes off from Washington, on Monday next to the Beverly Hills sign, with labor and civil rights groups.

The White House expressed no hesitation about Mr. Trump finally visiting the state that has been leading the opposition to him. Sarah Huckabee Sanders, the press secretary, said that while Mr. Trump may not have won California, “there is certainly a lot of support for this president, not just there but across the country.”

Ms. Sanders also said that Mr. Trump had no second thoughts about pressing ahead with the border wall. “The president campaigned on this, he talked about it extensively and he’s the president,” she said, adding it was “something that he is not going to back away from.”

Tensions between California and Washington have been high since Mr. Trump was elected, reflecting the decidedly different political philosophies between the president and many Democrats here. A poll by the Institute of Governmental Studies at the University of California, Berkeley, in December found that only 30 percent of respondents approved of his job performance; his national job approval rating has hovered around 40 percent, depending on the poll.