Here’s the scene: Donald Trump has bullied his way into Hogwarts’ Great Hall on the first day of school, jamming the Sorting Hat onto his helmet of hair. The Republican frontrunner demands it to assign him a House, but it doesn’t take a magic hat to tell us he’s a direct descendant of Salazar Slytherin himself. The science of it makes it obvious.

Slytherins are notorious jerks; cunning, resourceful, and ambitious, students of the great green house fall squarely under the personality paradigm scientists call the “Dark Triad,” University of British Columbia psychologist Del Paulhus, Ph.D. explains. For decades, Paulhus has studied Machiavellianism, narcissism, and psychopathy, a trio of related personality types that tend to provoke that unsettling mixture of fear, disgust, and admiration that American voters and Harry Potter fans are all too familiar with. Though generally appalling, Trump, like legendary Slytherins Draco Malfoy and Bellatrix Lestrange, has a certain sort of appeal, whether we want to admit it or not.

Understanding why requires accepting that Trump is a classic narcissist. “The narcissist is a boaster, drawing attention to him or herself, Paulhus tells Inverse. Typically, he explains, narcissists have something going for them — intelligence, attractiveness, or, in Trump’s case, wealth, which gives them a basis to think they’re superior to everyone else. That belief may or may not be justified. Regardless, it lets them maintain an overwhelmingly positive self-image, which propels them forward, poising them to become either great leaders or tyrants.

Like a less-refined version of legendary Slytherin Tom Riddle — who later becomes the Dark Lord Voldemort himself — Trump is completely at ease provoking outrage for his own benefit because he’s so sure that he’s right. That sort of self-confidence is intoxicating, Paulhus says, referring to his research on the success of different personality types during the job application process. “It was always the narcissist that got chosen as the most appealing applicant, even when everything else was controlled,” he says. “Something about their self confidence and their optimism about their future performance made people want to hire them.”

The problem, Paulhus points out, is that we’re not just drawn to narcissists — we want to be on their side. “People like to be included in the narcissist’s group,” he explains; they have a way of whispering, “Everybody’s stupid except for you and me.”

Depending on who’s whispering, this can be a scary thing. Trump has raised the ire of reasonable Americans by plotting to wall out immigrants (impractical, not to mention generally nasty), but in doing so he’s also forged bonds between the xenophobic among us, who end up becoming Trump’s staunchest supporters:

The students of Slytherin House were likewise bound together by racist beliefs; its founder, Salazar Slytherin, notoriously upheld a “pure-blood”-only policy, fencing Muggle-borns out while supporters like the aptly named Narcissa Malfoy helped keep the magically pure in. Narcissists are especially good at drawing those lines — and compelling people to pick a side.

While they may spend all of their time focusing on themselves, narcissists are not, by any means, necessarily ignorant. “Even though [Trump] sounds impulsive, he’s really just trying to be clever and appeal to people’s immediate reactions to the world,” warns Paulhus. “He was judged to be one of the smartest people in the world 25 years ago. There’s no doubt that he’s a smart guy. Just watch the way that he avoids questions.”

Tom Riddle, eloquent, intelligent, and completely self absorbed, succeeded in rebranding himself as the Dark Lord because he knew how to compel a crowd. Like Trump, what he was actually saying mattered less than the fact that he was saying it. For the same reason so many Harry Potter fans would rather be sorted into Slytherin than boring Hufflepuff, many Americans would, as Paulhus observes, “rather have Trump than Jeb Bush.”

We’re naturally compelled by Dark Triad personalities because they’re interesting, engaging, and attract our attention — as Paulhus puts it, “You’d rather hire a live wire than a dead fish” — but that’s all the more reason for voters to exercise constant vigilance. Maybe the Sorting Hat itself put it best: “Or perhaps in Slytherin you’ll make real friends/Those cunning folk use any means to achieve their ends.”