When Logan opens on a dystopian 2029, there are very few mutants—let alone X-Men—on the ground. But what happened to those hundreds of thousands of gifted men, women, and children Professor X was so fond of spying on via Cerebro? You’ll want to watch the film yourself to find out, though Logan—operating with a light touch—doesn’t go in for exposition-heavy monologues about exactly what happened when. For some complete answers (and a little helpful background from the comics), check out the the full story below the spoiler jump. Are you sure you’re ready for it? Here we go.

It’s entirely possible to piece together the evidence of how the X-Men were wiped out just by watching Logan—even though the film refuses to hold your hand through it. Early on the film, Charles (Patrick Stewart) mentions his old X-family, and Logan (Hugh Jackman) responds with an ominous, “They’re gone now.” If you thought Wolverine might somehow be responsible for their demise, you wouldn’t be too far off the mark.

We find out via flashback in Old Man Logan—the comic book this film is loosely based on—that Wolverine had tried to defend the X-Mansion from a vicious attack. Unable to locate his fellow teammates, he demolished the attackers single-handedly in a violent, bloody attempt to protect the young students at Charles Xavier’s School for Gifted Youngsters. It’s then revealed that the attack was an illusion created by the supervillain Mysterio—and instead of butchering enemies, Wolverine has actually wiped out his own friends and young charges. The trauma of this scars Logan, turning him into a broken husk of a Wolverine.

The film, however, goes in a different direction. In the movie, it’s Charles, not Logan, who destroyed the X-Men. Suffering from dementia, Xavier’s powerful brain has, according to Boyd Holbrook’s Pierce, been classified by the government as a W.M.D. “Shame what happened back East,” the henchman casually tells Wolverine. And when the Reavers attack a casino where Logan and Charles have been hiding out, we see the potential damage that Xavier’s decaying mind can inflict as his seizure paralyzes nearly everyone around him with crippling psychic pain. No wonder Logan wants to get him on a boat and sail out into the middle of the ocean: he’s desperately trying to protect the world from Charles’s mind. (Logan and Dafne Keen’s X-23, by the way, can endure/power through Charles’s seizures better than most, thanks to their ability to constantly heal themselves.)