WASHINGTON — Republicans, worried that Donald Trump’s unpopularity among voters will cost them their majority in the House in November, are expected to target someone they see as just as loathed among their base: San Francisco Democrat Nancy Pelosi.

In an effort to offset whatever damage the GOP presidential nominee might do to Republican chances of retaining control of the House, Pelosi would be portrayed as the “scary liberal” who would become speaker if Democrats take charge, according to some political observers.

“Pelosi may be the only Democrat out there more despised by Republicans than Hillary Clinton,” said Republican political analyst Ford O’Connell, referring to the Democratic nominee. “Nancy Pelosi is always someone Republicans can rally around.”

She’s someone Democrats can rally around, also. After years as a party leader, Pelosi remains popular inside her party and uses the GOP attacks to spur contributions to Democratic campaigns and causes.

Pelosi has made no secret of her glee at the prospect of becoming speaker again, but this time with the nation’s first female president should Clinton beat Trump. For Clinton, Democratic majorities in Congress would invest her presidency with vastly more ability to get things done.

It’s that prospect, say analysts, that Republicans would hammer into GOP voters to keep them from staying home on election day because they are disenchanted with Trump, or if they do show up, to persuade them from voting against Republicans down the ballot.

A spokesman for the National Republican Campaign Committee suggested that anti-Pelosi ads could start popping up in competitive districts around the country, including in California’s San Joaquin Valley, where Pelosi is deeply unpopular and where GOP incumbents Jeff Denham of Turlock (Stanislaus County) and David Valadao of Hanford (Kings County) are running for re-election in heavily Latino districts.

Meanwhile, Democrats are targeting suburban districts where Trump is trailing badly among college-educated voters and women, threatening to drag down otherwise safe GOP incumbents. Among the most prominent is Rep. Darrell Issa’s suburban San Diego seat, where the wealthy, nationally known, eight-term Republican faces a surprisingly strong challenge from Doug Applegate, a Democrat making his first run for office.

Democrats need a net gain of 30 seats to make Pelosi speaker again. Professional political handicappers currently estimate Democratic gains of up to 16 seats, but some political models are beginning to indicate that a Democratic majority may be within reach.

Pelosi served as House speaker from 2007 to 2011, under Republican President George W. Bush and President Obama, when she was instrumental in enacting Obama’s agenda, including the Affordable Care Act. The first woman to lead the House, she was considered among the most powerful speakers in modern times.

In 2010, the GOP launched a $65 million advertising blitz against her — including “Fire Pelosi” ads showing her engulfed in flames evocative of a witch burning — that helped Republicans retake the House, topple Pelosi’s speakership, and sink her brand to a favorability rating of just 25 percent, where it remains.

Should Democrats win back the House, she would be the overwhelming favorite among her House colleagues to become speaker again.

Pelosi spokesman Drew Hammill dismissed any planned efforts by the GOP to tie the election to Pelosi and instead sought to draw a connection between Republican incumbents and Trump, as Pelosi has been doing for months.

“Donald Trump is an exact reflection of Republicans in Congress,” Hammill said in an email. “Whatever Donald Trump says, House Republicans have beaten him to that punch over and over again, but with the power of their majority in Congress. ... When House Republicans are desperate they tend to embrace the same failed tactics of the past and that simply will not save their members from being Trumped.”

A recent memo by Democratic strategists James Carville and Stan Greenberg endorsed the Pelosi strategy, saying an emphasis on GOP positions on guns, abortion and LGBT rights can encourage moderate Republicans supporting Clinton to vote a straight Democratic ticket.

Retaking the House remains a daunting challenge. O’Connell, the GOP analyst, said only 35 House seats are in play, meaning Democrats would have to sweep nearly all of them. “You’d need almost a Goldwater meltdown by Trump,” O’Connell said, referring to the 1964 Republican nominee who lost in a historic landslide.

But political analyst Geoffrey Skelley of the University of Virginia’s Center for Politics said the House is within reach if Clinton wins by six points or more, based on a simple projection of the results in congressional districts from Obama’s four-point victory over Mitt Romney in 2012.

Clinton’s lead in national polls varies from as few as three to as many as seven points. The race remains volatile and could change at any point with some revelation, stumble or debate performance by either Trump or Clinton. Skelley said libertarian candidate Gary Johnson could shorten Clinton’s coattails by offering disaffected Republicans an alternative to Trump, boosting down-ballot Republicans.

Another model by James Campbell at the State University of New York shows that Democrats could net as many as 32 seats by adding up the “seats in trouble” in both parties. Pelosi sent a memo to her members last week calling attention to the results.

If Clinton appears headed for a landslide, Skelley said he expects Republicans to target Pelosi to make their case for keeping Congress under GOP control.

“If you get to a position in early October where it looks like Trump is done, or unlikely to come back, you could see them trying that argument against giving Democrats under Clinton full control of government,” Skelley said. “That’s when attacking Pelosi would certainly make a lot of sense.”

Carolyn Lochhead is The San Francisco Chronicle’s Washington correspondent. Email: clochhead@sfchronicle.com Twitter: @carolynlochhead