CLEVELAND — Soon-to-be GOP nominee Donald Trump trails Hillary Clinton by a slim margin heading into the GOP convention, but would be in tougher shape if another Democrat led the ticket: U.S. Sen. Elizabeth Warren, a new national Franklin Pierce University/Boston Herald poll shows.

Clinton leads Trump by just a 44-41 percent margin, with Libertarian Gary Johnson getting 7 percent and Green Party candidate Jill Stein drawing 2 percent, according to the poll of 1,007 likely voters nationwide. The margin of error is 3.1 (+/-) percent.

Franklin Pierce University / Boston Herald poll: US General Election results

But Warren, the Massachusetts Democrat and liberal darling, is beating the brash billionaire by a 47-40 percent margin in a theoretical matchup, according to the poll conducted July 12-16. Warren’s unfavorable rating of 31 percent is also 22 points lower than Clinton’s and 27 points lower than Trump’s.

Yet despite her popularity among liberals and strength as a presidential contender, Warren would only be a marginal asset as Clinton’s vice presidential pick, the poll shows.

Nearly 80 percent of likely voters said the freshman senator’s presence as Clinton’s running mate would have no effect on their decision. Just 12 percent said they’d be more likely to back the former secretary of state and 9 percent said they’d be less likely to vote for Clinton with Warren on the ticket.

The poll shows the huge image problem dogging both Clinton and Trump as they prepare for their formal nominations at the party conventions, beginning with this week’s Republican convention in Cleveland.

Trump’s unfavorable number, 58 percent, is 20 points higher than his favorable rating. Clinton is viewed unfavorably by 53 percent.

Even among Trump voters, 43 percent said they’re basing their decision more on dislike of Clinton than support for him. Forty-two percent of Clinton’s supporters are voting for her because they don’t like Trump.

And a majority of voters say they don’t think Clinton or Trump will do a good job of unifying the divided American public.

“Clinton and Trump are so divisive, their negatives are so high and the number of people voting for them because they don’t like the other candidate is so great, I’ve never seen anything like it,” Franklin Pierce/Boston Herald pollster R. Kelly Myers said.

And both camps are pretty set in their decisions — just 22 percent of Trump voters and 27 percent of Clinton supporters say they could change their minds.

Warren disappointed her followers by passing on the White House race, but has emerged as Trump’s arch-nemesis, with both regularly flinging insults at each other on the campaign trail and on Twitter.

The Bay State senator showed strength in the poll across all regions of the country and doesn’t have the baggage that has hampered Clinton and kept Trump in the race despite his unfavorable rating of 58 percent.

“Hillary Clinton has this legacy of negatives associated with her and her husband, and Elizabeth Warren doesn’t have that,” Myers said.

The pollster said it’s unlikely any running mate would be able to give the nominees much of a boost. Trump just announced Indiana Gov. Mike Pence as his VP pick.

Warren, in fact risks, suffering political damage, Myers added, if she’s closely linked to Clinton as her running mate or even as a high-profile surrogate.

A Twitter List by bostonherald //platform.twitter.com/widgets.js