SACRAMENTO, Calif. — Donald Trump is playing a starring role in at least five of the most hotly contested races for the California Assembly and Senate.

California Democrats in those races are using a strategy their party has employed in congressional and other contests across the country — spending millions of dollars to link Republican candidates to their party’s nominee for president, even in races where GOP lawmakers have refused to back Trump.

“Marc Steinorth and Donald Trump. Two sides of the same coin,” says a mail ad targeting an incumbent Republican lawmaker in San Bernardino County.

“What’s the difference between Dante Acosta and Donald Trump?” asks the narrator of a television ad for an Assembly race in the Santa Clarita Valley. “Nothing. Two candidates, same resume.”

Trump is extraordinarily unpopular in California, even for a Republican in the famously liberal state. Nearly seven in 10 California voters view Trump unfavorably, according to a Field Poll conducted last month. More than half said they hold a “very unfavorable” view of him.

Four years ago, 53 percent of Californians viewed Republican nominee Mitt Romney unfavorably.

Linking Republican legislative candidates with Trump can help sow negative feelings among voters that might ultimately affect their decisions at the polls, said Francis Neely, an associate professor of political science at San Francisco State University.

“When voters don’t know a lot about a contest and don’t know a lot about the candidates running, they’ll rely on whatever cues they can,” Neely said.

In a coastal Los Angeles County district represented by GOP Assemblyman David Hadley, the campaign of Democratic challenger Al Muratsuchi hung signs saying “Trump-Hadley” in big letters from street poles, as if the two are running mates. In tiny letters at the bottom, the signs include the required disclosure that they are paid for by Muratsuchi’s campaign.

Hadley has been publicly critical of Trump and says he has never supported the GOP nominee. He also opposes Hillary Clinton and said he hasn’t decided whom he’ll vote for in the presidential contest.

“There has been absolutely no equivocation or lack of clarity in my view about the nominee, and that’s why this is as outrageous as it is,” Hadley said.

Muratsuchi said he’s raising important information for voters and adds that Hadley has launched his own unsavory attacks.

“He has been running commercials and mailers with these disgusting ads trying to tie me to pedophiles,” Muratsuchi said. “All we’re trying to do is highlight his shared values with his own party’s nominee for president.”

A mail piece produced by Democratic challenger Abigail Medina’s campaign shows a computer-generated image of Trump with his arm around Republican Assemblyman Marc Steinorth of Redlands and an American flag in the background. It looks like they’re campaigning together.

Another, labeled “Twins” and made in the style of a movie poster, shows Trump and Steinorth in matching suits.

Steinorth said he does not support Trump and finds his rhetoric to be offensive.

“I think they’re just trying to buy this election,” Steinorth said of Democrats. “They have a woefully inadequate candidate, and they’re spending disgusting amounts of money lying about me and doing nothing to try and talk about what their candidate stands for.”

In campaign material in the Santa Clarita Valley race, Acosta is wearing Trump’s signature red “Make America Great Again” baseball cap. Acosta didn’t wear the hat, and the ad acknowledges in small print that the photo is manipulated.

Republican Assemblywoman Young Kim of Fullerton and Senate candidate Mike Antonovich, a Los Angeles County supervisor, have also been the targets of Trump-themed advertising.

Dave Jacobson, a Democratic political consultant working on the campaigns against Steinorth and Acosta, defended the material.

“(Trump) is the standard bearer of the Republican Party, and as long as they have that R seared on the ballot next to their name, they are responsible for the banner that their party carries, which is embodied by Donald Trump,” Jacobson said.