SAN FRANCISCO — Add this to Donald Trump’s list of accomplishments on the campaign trail this year: He’s absolved President Barack Obama of responsibility for all the problems he’s faced with Congress over the last seven years.

At least that’s how Obama tells it. According to the president, Trump is the embodiment of the Republican Party’s dysfunction, the natural outgrowth of an opposition that has become unmoored from reality.

The Republican front-runner has given Obama a way to brag about adding the collapse of the GOP to his legacy, providing the president with the highest-stakes argument for Democrats running for Congress: American democracy is on the line.

Trump, Obama said here Friday night in an argument he revved up over a two-day, back-to-back fundraiser California swing, “has stripped away any veneer of responsible governance from what had been the central tenets of an awful lot of Republicans in both the House and the Senate during the course of my presidency and before that.”

Obama keeps saying he always wanted a loyal opposition, that he thinks it would have been helpful to have a credible challenge over the years. That’s true, to an extent—except he’s also a competitive politician who’s just loving seeing his opponents come apart.

But what he and his aides seem to appreciate even more than that: the validation they’re claiming after seven years of hearing that the president’s problems on Capitol Hill are because he failed to maintain or even initiate a relationship with lawmakers – he didn’t golf enough with them, or have them over for drinks or schmooze sessions more.

I don’t think it’s his legacy, but the president’s success has catalyzed an identity crisis within the Republican Party that was inevitable — Dan Pfeiffer

“I don’t think it’s his legacy, but the president’s success has catalyzed an identity crisis within the Republican Party that was inevitable,” said Dan Pfeiffer, a former senior adviser to Obama who was at the San Francisco fundraiser Friday night.

“If there is one thing the success of Cruz and Trump has shown,” Pfeiffer added, “it is that there are bigger forces driving the Republican Party’s behavior than too few golf outings and cocktail parties.”

Thursday night in the tented backyard of the Disney Studios chairman, Obama called Republicans on talk radio and in their town halls “wacky.”

Friday, standing in a two-story, columned atrium with some of the richest Democrats in San Francisco in one of the most expensive houses in the wealthiest neighborhood in town, Obama dug in on an argument he’d started the night before.

“This notion that Donald Trump or Ted Cruz are outliers and that now suddenly the Republican establishment wants to—they’re embarrassed by them,” Obama said, beaming at House Minority Leader Nancy Pelosi.

“Why?” Obama asked cuttingly. “They’re saying the same things that these members of the Freedom Caucus in the House have been saying for years. In fact, that’s where Trump got it. … He said, ‘You know what? I can deliver this message with more flair, with more panache.’”

The crowd laughed along with him, then started applauding as he cast crushing defeats in November as something reasonable Republicans should be rooting for along with them.

I want a Republican Party that is rational and well-functioning — President Barack Obama

I want a Republican Party that is rational and well-functioning,” Obama said. “But that’s not what we have right now. And that’s why this election is so important.”

Winning, Obama said, won’t just advance Democratic causes in immigration reform, early childhood education and rebuilding infrastructure, “but I actually genuinely believe it gives an opportunity for Republicans to step back and reflect on where it is that they’re going.”

His assertion had a familiar ring to it. Obama promised in 2012 that re-electing him would “break this fever” among Republicans, convincing them to work with him once kicking him out of office was no longer an option.

After the campaign was over, aides admitted they knew this was just a line. There wasn’t going to be any fever breaking. Left out of the president’s account is any acknowledgement that many Democrats in the House have been counting down his presidency for two years or more, eager for someone in the White House who seems to care more about them than they believe Obama does. Or how the president could never stand Congress, even during his four years in the Senate. Or that Republicans blame him for exacerbating existing political divisions to the breaking point they’re at.

“While he’s the most polarizing president in modern history, the genesis of that can be found in his own actions: ramming Obamacare through on a party-line vote, massive regulations strangling jobs, and an unfettered desire to work around Congress and ignore the laws on the books,” said McConnell spokesman Don Stewart.

Obama’s contention that Trump shows that Republicans have been crazy all along and that’s why he couldn’t get more done in Congress are lines that “sound like the laments of a lame-duck president,” said Doug Andres, a spokesman for House Speaker Paul Ryan (R-Wisc.). “His playbook is stale: refuse to engage with Congress and proceed to vilify them for not enacting his liberal agenda.”

On Friday, as he’s done before, Obama said that much of his agenda isn’t liberal, but was Republican until the Republicans turned against it because he embraced it. He’s said before that racism seems to be a factor. Repeatedly — including during these speeches to Democratic donors — the president has blamed the current anti-establishment politics in both the Republican and Democratic presidential primary races on people still not feeling secure financially, either directly or through a sort of post-traumatic recession stress disorder.

Democrats are eager for him to campaign like this. They’re trying to get their base to care about down-ballot races, and nothing gets them going like stories of Republican obstruction and getting in the way of a president who, as no one in the West Wing can go more than 10 minutes without pointing out, remains the most popular Democrat (and the most popular politician in either party).

When Obama makes congressional races about payback for seven years of insulting him, Democratic operatives believe he makes it real in a way that’ll matter more than any campaign ad or aspiring candidate can.

US President Barack Obama greets well-wishers upon arrival at Los Angeles International Airport in Los Angeles on April 7, 2016 Mandel Ngan/AFP via Getty Images

“That is a first-person explanation he provides,” said Kelly Ward, the executive director of the Democratic Congressional Campaign Committee, who was a few tables away from Julia Louis-Dreyfus and Julia Roberts at the Los Angeles fundraiser Thursday night.

Obama regularly complained while campaigning during the 2014 midterms that Democrats don’t vote in off years the way they do in presidential election years. On this trip, he said, he was getting worried that Democrats wouldn’t be voting as much as they need to in this presidential election year, and certainly not paying enough attention to down-ballot races.

“There are times where, as devoted as all of you are, when I’m traveling through Democratic circles I see, ‘Oh, Mr. President, we love you so, and we’re going to miss you so. And sometimes I’m not that excited about this election.’ And I say, I have no patience for that,” Obama said, urging people to remember the laws he did get through Congress over his presidency. “It starts not just at the presidential level, but in us recognizing the enormous power of Congress and the difference between a Nancy Pelosi being Speaker of the House and a Paul Ryan being Speaker of the House.”

At the same time, many Republicans are terrified of what Trump or Cruz at the top of the ticket will mean in their House and Senate races. The Republican majority in the House is almost certainly going to shrink, and some have started entertaining the long shot chance that Democrats might actually be able to take over. Most see at least a good chance of the Senate flipping back to the Democrats.

Republicans working these races seem just as eager as Democrats to make the race about Obama.

The president’s attacks at the fundraisers, are “exactly the kind of arrogance and lack of self-awareness that cost him the Senate and House during his presidency and is a direct insult to voters,” said National Republican Senatorial Committee communications director Andrea Bozek.

“Although what else do Democrats have to talk about? It’s not like any of their candidates can or want to run on Obama’s policies. Every single one of his ‘accomplishments’ comes with a list of broken promises—the stimulus, Obamacare and Iran.”

Stewart also pushed back on Obama claiming Republicans were the ones who got in his way.

“The president may not want to acknowledge the work that’s being done, but his bill-signing pen has been busy over the last 15 months of Republican control of the Senate,” Stewart said.

Then again, Republican leaders are the ones stuck trying to figure out how to stop Trump from getting their nomination, and holding their noses as they look to Cruz to save them from the predicament.

For the House and Senate races, though, they’re happy to make this about Obama too.

“Republicans,” Andres said, “are focused on a bold agenda to enact after this president leaves office.”