Director James Wan revealed how he came up with the jaw-dropping third act twist that caps off his latest horror movie Malignant. Wan cut his teeth kickstarting horror franchises like SawInsidious, and The Conjuring, all of which have become some of the most prolific horror properties over the last two decades. Now, the director has arrived with a terrifying new vision. Malignant follows Annabelle Wallis' Maddie, a woman who is being haunted by a spectral being named Gabriel. She is forced to watch him commit increasingly gruesome murders through some sort of psychic connection the two have and, as the movie unfolds, Maddie and Gabriel's connection is slowly revealed.

After revealing that Maddie and Gabriel are linked through the past, Wan delivers Malignant's most shocking twist. Gabriel is Maddie's parasitic twin living in the back of her skull with the ability to take over her body and kill whoever he wants to. Before she was adopted, Maddie and Gabriel were experimented on at a research facility and when they couldn't remove him completely from Maddie's body, they shoved Gabriel's little brain-like face into the back of her head. Earlier in the film, Gabriel had been awakened when her abusive husband pushes Maddie's head against a wall and now Gabriel is reigning terror on the doctors who tortured him in his youth.

Related: Malignant And Last Night In Soho Are Heading Up A Giallo Revival

Wan revealed to EW just how he came up with this twist, revealing that his wife and co-writer Ingrid Bisu, does a lot of research into medical anomalies, leading her to discover the concept of teratomas, tumors that grow bones and muscle. Upon hearing this, Wan's horror-obsessed mind began immediately thinking of all the possibilities and, while spitballing with Bisu, this concept turned into Malignant. Check out his full quote below:

My wife, Ingrid, she does a lot of research into medical anomalies. She goes, 'There are people that are afflicted by this thing [teratomas], that were born like this.' I just thought, wow. So obviously my horror movie-f---ed mind went immediately to the most messed-up story I could come up with. Her and I, we just started spitballing ideas and [it] eventually snowballed into a concept. The whole time I was thinking, how do I take this seed of an idea and actually turn it into a film and what I can do with it that can possibly allow me to have fun with all kinds of practical effects that I haven't played with in a while? You know, the blood and guts and all the cool animatronic stuff. It stemmed from all kinds of aspirations, but that really was the start of that idea.

Malignant Parasitic Twin Gabriel

Malignant's ending may go down in history as one of the most bonkers horror movie endings of all time. While the first two-thirds of the film are largely by-the-numbers for Wan's oeuvre, Malignant's third act becomes a mixture of John Wick's acrobatic fighting and the most terrifying slasher imaginable as Gabriel kills an the entire population of an inner-city police station. First, though, he shows Gabriel's gory face pushing its way out of the back of Maddie's skull in what is a perfectly timed reveal.

While Wan sets up a potential sequel in the final act of Malignant, it will be hard to top a twist like this. While the film isn't exactly an all-out horror fest like Insidious or The Conjuring, it clearly shows what Wan is capable of when the studio fully backs his wild vision. If more studios were brave enough to make movies like this, ones where the director winks to the audience while pulling the wool over their eyes, the industry would be all the better for it.

More: Why Malignant Is So Divisive (But Not Its Third Act)

Source: EW