Donald Trump has a new political foe, and it isn’t a Democrat or an old-stock Republican. In fact, he isn’t even real.

A new study from the University of Pennsylvania found that people who have read the wildly popular Harry Potter series are less likely to support Donald Trump.

Researchers say the series’ core virtues – respect for societal differences, opposition to violence and the rejection of authoritarianism – seemed to resonate with readers no matter their political slant, religion, age or gender.

“Because Trump’s political views are widely viewed as opposed to the values espoused in the Harry Potter series, exposure to the Potter series may play an influential role in influencing how Americans respond to Donald Trump,” Diana Mutz, a professor of political science and communication at the American university, wrote in a statement.

“It may simply be too difficult for Harry Potter readers to ignore the similarities between Trump and the power-hungry Voldemort.”

The study polled a nationally representative sample of 1,142 Americans in 2014 and again in 2016. Participants were asked how many Harry Potter books they’d read and their opinions on waterboarding, the death penalty, and the treatment of gays and Muslims.

But in 2016, Mutz slipped in a timely political question. She asked participants to rate their feelings about Donald Trump on a scale from zero to 100.

The study found that respondents’ evaluations of Trump were lowered by roughly two or three points for each Harry Potter book they read.

“This may seem small, but for someone who has read all seven books, the total impact could lower their estimation of Trump by 18 points out of 100,” Mutz wrote.

Respondents were also more likely to report positive opinions on gays and Muslims after reading the books, researchers found.

As for party affiliations, Mutz found no discernable link between a person’s political views and the likelihood that they had read the Harry Potter books.

‘Harry Potter effect’ disappears in films

Harry Potter invoked in China, Japan dispute

Researchers say the correlation is likely driven by the impact that sitting down and reading the series – more than 4,100 pages total over seven books in the U.S. editions -- had on readers. In fact, they found that the so-called “Harry Potter effect” vanished when they studied participants who simply watched the movies. Researchers hypothesized that the books were more effective than the film series at influencing opinions because they take more time and sustained focus to finish.

“Throughout the series, love and kindness consistently triumph over aggression and prejudice,” wrote Mutz. “It’s a powerful positive theme, and thus not surprising that readers understand the underlying message of this storyline, and are moved by it.”

It isn’t the first time Trump has been compared to Lord Voldemort, also known as He-Who-Shall-Not-Be-Named and “the dark lord.” Last December, the BBC published a tongue-in-cheek story that quoted Twitter users who drew the comparison and suggested that Trump’s signature blonde hair was one of his “horcruxes” -- that is, a vessel containing a fragment of his soul that would need to be destroyed in order for him to die.

Author J.K. Rowling later responded to the article and tweeted: “How horrible. Voldemort was nowhere near as bad.”

How house elves influenced Americans

Magical world of ‘Harry Potter’ arrives in Edmonto

The U.S. study pointed out specific plot points that seemed to counter Trump’s political ideology.

For instance, in the early books, Harry and his friends (particularly Hermione Granger) stand up for house elves, a group of magical creatures bound to serve their masters. The book also includes “half-bloods” – a wizard of partial muggle (non-magic) descent – that is targeted for extermination by Lord Voldemort and his gang of evil Death Eaters. The books repeatedly include the sentiment that all wizards and magical creatures are created equal and deserve respect.

“Trump, by contrast, has called for a temporary moratorium on Muslim immigration and made offensive comments about outgroups of all kinds, including women, Mexicans, Asians, and those with disabilities,” the study says.

The novels also celebrate non-violent means of conflict resolution and do not glorify revenge. For example, during the dramatic Battle of Hogwarts in the final novel, Harry rescues his arch-nemesis, Draco Malfoy, when a fire tears through the room of requirement.

Trump has often spoken about getting back at America’s “enemies” and repeatedly discussed his partiality for waterboarding during the Republican debates. Trump has also praised acts of violence committed by supporters during his rallies.

New ‘Potter’ book looms

Harry Potter and the Cursed Child

In a few select cases, literature has played an important role in guiding public opinion. The widely-read anti-slavery novel “Uncle Tom’s Cabin,” written by Harriet Beecher Stowe and published in 1852, was regarded as a key reason the American public rejected slavery.

But the University of Pennsylvania researchers said this phenomenon is rare, and that the popularity of the Harry Potter series – which has sold more than 450 million copies worldwide since 1997 – gave them a unique opportunity to poll the public.

And with the eighth installment of the Harry Potter series, “Harry Potter and the Cursed Child,” set to be released on July 31, the “Harry Potter” effect could get new momentum at a critical point in the U.S. election.

“Harry Potter’s popularity worldwide stands to make a difference not just in the U.S. election, but in elections across Europe that involve aggressive and domineering candidates worldwide,” Murtz wrote.