Los Angeles (AFP) - US President Donald Trump is heading to California, a state at the forefront of resistance to his anti-immigration agenda, for what is almost certain to be a contentious trip.

Trump's first trip to California as president, on Tuesday, comes at a time of high tensions between his Republican administration and the Democratic-leaning most populous US state, especially on immigration issues.

Attorney General Jeff Sessions has accused the state of deliberately obstructing enforcement of federal law by offering undocumented immigrants sanctuary protections.

Governor Jerry Brown said the Trump administration "is basically going to war against the state of California," after the Justice Department sued to block its sanctuary laws.

"Sanctuary jurisdictions are the best friend of smugglers, gang members, drug dealers, human traffickers, killers and other violent offenders," the president said in his weekly address.

"The state of California is sheltering dangerous criminals in a brazen and lawless attack on our constitutional system of government​."

The president will land at the Miramar air base in southern California and then go see prototypes of the wall he wants to build on America's southern border.

California was among the plaintiffs that launched an unsuccessful court challenge to waivers to environmental regulations that were granted so the construction of the prototypes and the replacement of existing border fencing could proceed.

"We're going for what we hope to be an incredibly positive trip," White House spokeswoman Sarah Sanders said Friday, while also taking aim at California for "refusing to follow federal law," a reference to the state's efforts to shelter illegal immigrants from deportation.

Trump will also meet with members of the US military, Sanders said.

And he is expected to wrap up the visit with an evening of fundraising in Beverly Hills to raise money for his 2020 re-election campaign.

- 'A place with money' -

Story continues

The "Golden State" and the president are at odds over issues ranging from immigration and the environment to marijuana and guns.

Trump's visit is "part of a bigger concerted effort to push back on liberal efforts on immigration in California," said Julian Zelizer, professor of history and public affairs at Princeton University.

"He's trying to shore up the California GOP (Republican Party) for the mid-terms and 2020," Zelizer said, referring to 2018 Congressional elections and the presidential race two years later.

Despite its generally liberal leanings, "California is a place with money," and the president has had success with people such as Peter Thiel, a Silicon Valley entrepreneur known for his conservative positions, as well as in wealthy Orange County, Zelizer said.

The Los Angeles Times reported that donors will contribute up to $250,000 a person to Trump's re-election campaign and the Republican party at a fundraiser in Beverly Hills, citing an invitation obtained by the newspaper.

- Focus on Republican areas -

Trump has taken longer to visit California following his election than any president since Franklin Delano Roosevelt, according to US media.

"His whole focus till now has been... on Republican areas," Zelizer said. "He's not someone who wants to see the whole country, not a traveler interested in sensing the pulse of the nation."

Trump's visit to California will be marked by protests, both for and against the president and his policies.

Alliance San Diego, which namely advocates on behalf of immigrants, is planning a news conference and a protest the day before the president's arrival "to set the tone for Trump's visit," said executive director Andrea Guerrero.

Events and demonstrations could last until after his departure, she said.

Jeff Schwilk, the founder of San Diegans for Secure borders, told the Los Angeles Times that he is planning an event to support Trump's visit to inspect border wall prototypes.

In another sign of the tensions at play as Trump readies for his trip, the American Civil Liberties Union filed a complaint in San Diego federal court challenging the Trump administration's practice of "forcibly separating" asylum-seeking parents and young children.