Harry Potter may be casting a spell over Donald Trump.

A new study by a University of Pennsylvania professor found that those who read books in the  popular series about the boy wizard have lower opinions of the Republican presidential nominee. And the more books in the series participants had read, the less favorable their views of Trump.

The study by political science and communication professor Diana Mutz, called "Harry Potter and the Deathly Donald," is set to be published in a special election issue of the journal PS: Political Science and Politics.

Mutz polled a nationally represenative sample of 1,142 Americans and asked, among other topics, about their feelings for Trump on a scale of 0 to 100. She found that each Harry Potter book read lowered the respondant's evaluation of Trump by two to three points, for a roughly 18-point difference if someone has read the entire seven-book series.

"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," Mutz wrote.

Those values include tolerance and opposing violence, punitiveness and authoritarianism, according to the professor.

She added: "It may simply be too difficult for Harry Potter readers to ignore the similarities between Trump and the power-hungry Voldemort."

J.K. Rowling, the series' author, has called the businessman even worse than her villain.