SAN DIEGO — President Trump’s welcome committee, a few hundred strong, many dressed in the colors of the flag, gathered on Tuesday at an industrial park not far from the border, and not far from the prototypes of the president’s border wall.
It was part pep rally and part celebration of what they viewed, with the president’s trip, as a fulfillment of a promise, the reason they voted for him: the construction of a wall to keep undocumented immigrants away.
A few miles of freeway to the west, Mr. Trump’s opponents gathered in the parking lot of a hilltop church, overlooking Mexico. The distance between the groups was by design. Organizers from each side said they wanted to stay separate, and avoid clashes.
It was Mr. Trump’s first visit to California since his election in 2016, a state with which he has had particularly difficult relations. After landing on Tuesday, he inspected the series of wall prototypes, accompanied by United States Border Patrol agents on horseback, and talked about the need for a stronger barrier along the border. “People are pouring in,” he said. From here, he was heading to a military base to give a speech and then to Beverly Hills for a fund-raiser before spending the night in downtown Los Angeles.
As much as each gathering represented opposing views of a polarized America, many of the same emotions were on display — anger, resentment, sadness. On each side were woeful personal stories — on the Trump supporters’ side, of loved ones lost to murders or drunken-driving crashes involving undocumented immigrants; on the opposing side, of families separated, or of desperate migrants dying trying to reach the United States.
It was not a day for mass protests or the streets, but a day for the bullhorn and the podium, as activists and organizers, clergymen and politicians, used the visit to hone their messages in advance of elections.
And Mr. Trump seemed eager to join the fight between the White House and California Democrats that set the stage for this particularly fraught visit, stopping after his tour of the wall to offer caustic remarks about Gov. Jerry Brown, a Democrat.
“The governor is doing a terrible job running the state of California,” Mr. Trump said. “I have property in California. The taxes are way, way out of whack. People are going to start moving pretty soon. And if you don’t have safety, meaning if you don’t have this kind of wall, the drugs are pouring through in California.”
“The governor of California: nice guy,” Mr. Trump added. “Has not done the job. The taxes are double and triple what they should be.”
Not far away from where the president was speaking, a scratchy rendition of Lee Greenwood’s “God Bless the U.S.A.,” mixed with clips of Mr. Trump’s acceptance speech at the 2016 Republican National Convention, played as his supporters here celebrated themselves as “deplorables,” enthusiastic gun owners and defenders of Americans from crimes committed by immigrants. They had gathered hoping for a glimpse of the president’s motorcade.
“He said secure the borders, build the wall, everything,” said Julie Horn, explaining her support.
“I think he’s done great,” said her husband, Scott, a retired construction worker.
As Trump supporters in progressive, blue-state California, they said they would have left the state if it had not meant being far away from their grandchildren.
“There are a lot more of us than you realize,” Ms. Horn said. “You don’t put a Trump sticker on your car. Your car will get smashed.”
In rallying the crowd, Jeff Schwilk, the founder of San Diegans for Secure Borders, borrowed a term that is often applied to liberal California in the age of Trump.
“We are the resistance,” he said. “We are the push back to that.”
At the church gathering a few miles away, Representative Juan Vargas, a Democrat whose district includes part of San Diego, delivered a passionate rebuke of the president.
“We have to resist and we have to let him know that California doesn’t welcome him,” he said.
The opposition rally brought together a diverse coalition of faith-based groups, union organizers and immigrant rights activists, urging the audience to stand against the Trump agenda at every turn.
Saying that Jesus was killed because he broke the rules, the Rev. Neal Jose Wilkinson, a pastor in San Diego, made a plea for civil disobedience. “There’s a higher authority then you, Donald Trump!” he said.
And there were softer appeals as well. “I ask you to keep building bridges of love,” said the Rev. Jose Castillo, of Our Lady of Mt. Carmel church, where the rally was held. “Of kindness to other people.”
For some, the dueling rallies were an opportunity for political organizing, across party lines. In the morning, one man was gathering signatures at the Trump rally for a ballot initiative to require a supermajority to raise taxes.
In the afternoon, he was at the other rally, with the Trump opponents, wearing a Che Guevara T-shirt and gathering signatures in support of several progressive causes: more money for schools, animal protection, rent control, removal of lead paint from schools. The man, who asked that his name not be used because he did not want to be identified with any political cause, said he worked as an independent contractor for a number of interest groups, gathering signatures for petitions.