Missouri Sen. Claire McCaskill is getting hammered in a new web ad for holding a campaign fundraiser with former President Barack Obama in Beverly Hills.

In the ad, her likely Republican rival, Attorney General Josh Hawley, labeled her a “hypocrite” for claiming she’s not part of the Democratic Party establishment and then flying to Beverly Hills to benefit from the first fundraiser hosted by Mr. Obama this election cycle.

The ad went up within hours of news that Mrs. McCaskill, Missouri Democrat, was teaming up with Mr. Obama.

Mrs. McCaskill is among the most vulnerable Senate Democrats. She’s running in a state that President Trump easily won in 2016.

She told the St. Louis Post-Dispatch that she believed the fundraiser was also for the Democratic Senatorial Campaign Committee.

The video includes clips of Mrs. McCaskill proclaiming: “I fought the establishment almost every step of the way in my career,” and “I could care less what the national party thinks.”

The remarks are interspersed with footage of the iconic Beverly Hills sign in Beverly Gardens Park and the town’s palm tree-lined Canon Drive.

Text on the screen reminds Missouri voters that “McCaskill is the top recipient from lobbyists and lawyers in all of Congress.”

The ranking is attributed to 2018 campaign finance data compiled by Open Secrets.

The ad concludes with on-screen text: “Fighting … all the way to Beverly Hills. Hypocrite Claire McCaskill.”

Mr. Hawley was hitting his rival for the fundraiser throughout the day.

Mrs. McCaskill told the newspaper that Mr. Hawley also used out-of-state fund raisers.

She said the location in Beverly Hills was selected based on Mr. Obama’s schedule.

“I think Mr. Hawley’s going to be — he’s already raising money all over the country,” Mrs. McCaskill said. “It’s what happens when you run for the United States Senate. He understands that.”