Former Vice President Joe Biden blasted Donald Trump during a speech at a private fundraiser Thursday night in Irvine, saying the president’s recent actions in the Middle East have made America “more vulnerable.”

But the leading Democratic presidential candidate was also optimistic, telling the crowd of some 130 elected officials, company CEOs, actors and other supporters that he can “restore the soul of this country” if elected president.

“This is the man who can beat Trump,” said Joe Kiani, who founded a medical device company and hosted Thursday’s fundraiser. “This man can unite our country.”

The event was held in Kiani’s home in Irvine’s guard-gated Shady Canyon community, which boasts 400 homes surrounded by a nature preserve, including an estate that author Dean Koontz recently nabbed for $11.6 million.

Guests handed valet the keys to their Teslas and Mercedes SUVs and a red Ferrari with a Harley Rouda bumper sticker. They walked under trees covered in white twinkle lights, past a fountain and stepped into a modern living room. Servers offered salmon on triangles of wheat toast and glasses of wine.

Each person paid $1,000 to attend or $2,800 — the maximum amount individuals can give candidates in one election cycle — to get a photo with Biden.

During a 30-minute speech, Biden discussed tackling climate change, taking on the NRA and investing big money to “fundamentally change the way we educate our children.” But he spent much of his time focused on events in Iran and Iraq, saying this week’s situation was fully predictable based on Trump’s behavior.

“Anything that Barack and I did, he’s determined to undo,” Biden said, adding that Trump’s desire to undo Obama administration policies sometimes overwhelms Trump’s own stated platforms.

“This is the guy who said he wanted to end endless wars in the Middle East,” Biden said of Trump. But he added that Trump’s decisions in the region, including “walking out” on the Iran nuclear deal and the aggressive moves that unfolded there and in Iraq this week, seem to be leading the country into more prolonged conflict.

“His America first policy has actually made America last,” Biden said.

“We used to have allies,” he added. Now, he said, NATO members are equating the United States with Iran and asking both countries to “stand down” to prevent further escalation of violence.

“The end result of all of this is we find ourselves more vulnerable.”

Biden praised House Speak Nancy Pelosi’s work Thursday in the House of Representatives to pass a resolution to limit the president’s powers to go to war.

“The president has been put on notice. He does not have the authority to take us to war.”

Given the seriousness of such international tensions, Biden argued he’s the best candidate to step into office and take on those challenges. His experience, he said, means he could do this without any “on the job training.”

Biden also argued his candidacy— and the prospect of his election — is particularly concerning to despotic leaders such as Russia’s Vladimir Putin and Kim Jong Un. Biden noted that the North Korean leader recently called him a “rabid dog” while he sent Trump a “love letter.”

Biden also suggested that Trump’s presidency doesn’t represent what most Republicans stand for either. “This is not who America is.”

Biden discussed why he didn’t run last cycle and what got him into the race this time, saying that the 2017 white nationalists rally in Charlottesville was a wake up call that we hadn’t made as much progress as he’d hoped since his work, 40 years ago, to boost civil rights.

“I was wrong about being able to defeat hate,” Biden said. “Hate only hides. … It requires you to be constantly vigilant about it. … Our children are listening and our silence is complicity.”

But Biden said he’s tired of seeing people of all political stripes hanging their heads and saying how horrible things are. He said he remains optimistic that, if Trump is defeated, nothing can hold the United States back from remaking itself as it has many times in the past.

“I’m more optimistic about America’s chances to own the 21st Century than I’ve ever been in my whole life.”

Biden skipped the California Democratic Party’s convention in Long Beach in November. But he held local fundraisers in Southern California, visiting Los Angeles in November and again in early December. And he was most recently in Southern California on Dec. 19 to attend the presidential debate at Loyola Marymount University.

The former vice president spent Thursday afternoon touring the Port of Long Beach. Earlier in the day, Biden’s camp announced endorsements from Los Angeles Mayor Eric Garcetti and Long Beach Mayor Robert Garcia.

Biden was scheduled to head to Los Angeles on Friday to meet with Garcetti and host another fundraiser.

Editor’s note: This article has been updated to correct the name of the fundraiser’s host.