Donald Trump is coming – at last – to the state he loves to hate, setting foot in California for his first time as president.

This is turf he lost to Democrat Hillary Clinton by more than 4 million votes in 2016. He has mocked its judges for blocking his agenda, sued over its lax enforcement of immigration laws and threatened to pull out federal agents.

But there's something he's dying to see here: the prototypes for his long-promised wall on the U.S.-Mexico border. And there's something he's eager to do here: raise cash from the Beverly Hills crowd.

Trump's arrival Tuesday will come just days after his Justice Department sued to block a trio of state laws designed to protect people living in the U.S. illegally. Democratic Gov. Jerry Brown likened it to 'an act of war' with Trump's administration.

'The State of California is sheltering dangerous criminals in a brazen and lawless attack on our Constitutional system of government,' Trump complained in his weekly address, accusing California's leaders of being 'in open defiance of federal law.'

President Donald Trump, pictured Saturday night during a Pennsylvania rally, will head to California on Tuesday to raise money and make a splash about immigration

Trump is expected to visit these prototypes of border walls in San Diego, just across the border from Tijuana, Mexico

'They don't care about crime. They don't care about death and killings. They don't care about robberies,' he said, calling on Congress to block the state's federal funds.

Further north in tony Beverly Hills, Trump will entertain 1-percenters at a fundraising dinner where attendees will pay as much as $250,000 each

Last week, Oakland's mayor warned residents of an impending immigration raid – a move that Trump called disgraceful and said put law enforcement officers at risk.

The state has also joined lawsuits aimed at stopping construction of Trump's stalled border wall. And its judges have repeatedly ruled against policies Trump has tried to enact.

In recent months, Trump and other administration officials have threatened both to flood the state with U.S. Immigration and Customs Enforcement agents and to pull ICE out of the state completely.

'I mean, frankly, if I wanted to pull our people from California, you would have a crying mess like you've never seen in California,' Trump said last month, predicting 'crime like nobody has ever seen crime in this country.'

Meanwhile, Trump's acting ICE director has repeatedly threatened to increase its enforcement footprint in the state in retaliation for its limited cooperation with federal immigration authorities - and he appears to be making good on his promise.

'California better hold on tight. They're about to see a lot more special agents, a lot more deportation officers,' Thomas Homan said on Fox earlier this year before his agency conducted a series of raids.

White House Press Secretary Sarah Sanders says California's Democratic politicians are 'stepping out of bounds' by 'refusing to follow federal law' on immigration

White House officials said the trip has been in the works for months and the timing so close to recent flare-ups was coincidental.

When asked if Trump planned to play nice on the trip, White House spokeswoman Sarah Huckabee Sanders said, 'Look, I think if anybody is stepping out of bounds here, it would be someone who is refusing to follow federal law, which is certainly not the president. And we're going for what we hope to be an incredibly positive trip.'

Trump's overnight visit will include a stop in San Diego to inspect eight sample designs for the wall he's been raring to build. He will also be speaking with members of the military and traveling to Los Angeles for a splashy Beverly Hills fundraiser, where attendees will pay up to $250,000 per person.

Trump's appearances in the left-leaning state during the 2016 campaign were marked by sometimes-violent clashes between his supporters and opposition groups. In some cases, protesters blocked traffic and threw rocks and beer bottles. Protests are expected during this trip.

Trump's more than yearlong absence from the nation's most populous state - home to 1 in 8 Americans and, by itself, the world's sixth-largest economy - has been conspicuous but not surprising. Trump country, it's not.

As a candidate, Trump suggested he could win California, a state that hasn't supported a Republican for the White House in three decades.

Since his election, Sacramento has emerged as a vanguard in the so-called Trump resistance. Democratic state Attorney General Xavier Becerra has filed nearly 30 lawsuits to block administration proposals.

California was the home of Richard Nixon and Ronald Reagan, but Republican influence here has been fading for years as a surge in immigrants transformed the state and its voting patterns.

The number of Hispanics, blacks and Asians combined has outnumbered whites since 1998. Meanwhile, the state's new voters, largely Latinos and Asians, lean Democratic, and Democrats hold every statewide office and control both chambers of the Legislature by hefty margins.

Trump may not get the hero's welcome in California that he received Saturday night in western Pennsylvania

Two of the border wall prototypes are seen from the Mexican side of the border in Tijuana

Polls have found Trump deeply unpopular in the state, with most residents opposed to policies he's championed, such as expanding offshore drilling.

Jessica Hayes, chairwoman of the San Diego County Democratic Party, said Trump's anti-immigration rhetoric plays especially poorly in a state with close trade and tourism connections with Mexico.

'These are our neighbors. These are our friends,' she said.

Trump has repeatedly floated the idea of flying in to pick the winning design for the border wall, telling rallygoers last year in Alabama: 'I'm going to go out and look at them personally and pick the right one.'

The Department of Homeland Security has said there's nothing to stop Trump from turning the wall design contest into a Miss Universe-style pageant.

But the department also says it doesn't anticipate that a single prototype will be selected. Instead, the samples are expected 'to inform future border wall design standards,' said spokesman Tyler Houlton.