The comedy and horror genres might seem like they’re at odds. One is built around making the audience feel joy, while the other is built around terrifying the audience and making them feel uncomfortable. But, under the right circumstances, comedy and horror can go hand-in-hand. A handful of genre-bending comedy-horror gems have found a sweet spot between the two that proves these strange bedfellows are surprisingly well-matched. Movies like Shaun of the Dead and An American Werewolf in London have handled the tonal balancing act beautifully, with plenty of big laughs and just as many genuine frights.

Humor has become more prevalent in the horror genre in the past few years, because more and more comedians are taking a plunge into the gruesome and the macabre. Since Jordan Peele managed the astonishing transition from acclaimed sketch comic to Oscar-winning horror filmmaker, comedians like Chris Rock and Danny McBride have put their own stamp on horror cinema. Rock starred in Spiral, a police-procedural reinvention of the Saw franchise, based on his own pitch, while McBride has co-written the Halloween reboot trilogy and played a supporting role in Alien: Covenant.

RELATED: This Horror Masterpiece Has No Signs Of Horror For The First Hour

Writing comedy and writing horror are fundamentally the same – they’re based entirely on instinct. It’s all about timing: the monster needs to jump out of the closet at just the right moment, much like the punchline to a joke needs to be delivered at just the right moment. When Peele, Rock, and McBride made the transition from comedy to horror, they just tuned their creative instincts to look for the next scare instead of the next laugh.

Two Sides Of The Same Coin

Katherine Waterston and Danny McBride with big guns in Alien Covenant

The effectiveness of both comedy and horror can be measured by a palpable audience response. Whether they’re making a comedy movie or a horror movie, Peele and his peers can gauge how well that movie is working by showing it to an audience and seeing how they respond to it. If the audience is laughing during a comedy, the comedy works. If they jump, shriek, or perch on the edge of their seats during a horror film, the horror film works.

Comedies and horror films both rely on the element of surprise. Comedy and horror filmmakers alike need to be able to lead the audience to think one thing and give them something completely unexpected instead. Both genres utilize the element of surprise in different ways, but it’s all about that rug-pull. Directors of both comedies and horror movies need to stay a few steps ahead of their audience, anticipating their response and subverting their expectations.

Does Humor Belong In Horror Films?

Chris Rock on the poster for Spiral

In an interview with Time Out, Quentin Tarantino said, “I would love to make a really, really scary horror film, like The Exorcist. But I don’t know if me taking my sense of humor and putting it in the backseat just to hit a tone of dread from beginning to end is the best use of my talents or my time.” This statement presupposes that for a horror movie to be truly effective, it can’t have any elements of humor. Certainly, some of the greatest horror films have created that “tone of dread from beginning to end” with a harrowing lack of humor – like Hereditary, Don’t Look Now, and Tarantino’s example, The Exorcist – but it’s not a hard-and-fast rule by any means.

Peele and his fellow comedian-turned-horror filmmakers have proven that humor doesn’t have to come at the expense of fear in a horror movie. McBride’s Halloween script has a scene in which a podcaster’s head is repeatedly slammed against the wall of a gas station bathroom and it also has the line, “I got peanut butter on my penis.” Comedic moments can break up the tension and provide the audience with some much-needed relief in a horror movie.

Kitty Tyler begs for her life while covered in blood in Us

Peele has taken big swings with gags right in the middle of set-pieces, and has such razor-sharp command as a director that he makes those big swings work. In Peele’s sophomore feature Us, when the “Tethered” clones attack the Tyler family in their vacation home, a blood-soaked Kitty desperately tells her Alexa-style virtual assistant, Ophelia (a fun nod to Shakespeare), to call the police. Ophelia mishears and says, “Playing ‘F*** tha Police’ by N.W.A.” This is a great bit that lands perfectly and doesn’t get in the way of the horror because, right after the laugh, the hip-hop classic creates an unnerving juxtaposition on the soundtrack as the clones close in on Kitty and she loses hope. Plus, thematically, it’s a protest song calling out systemic oppression, which is what Red’s Tethered revolution is all about.

It’s clear from the work of Peele, McBride, Rock, and countless iconic horror directors who employ humor in their work (Sam Raimi, Wes Craven, John Landis, etc.) that there’s plenty of room for laughs in movies intended to thrill and terrify. There’s a ton of dark laughs peppered throughout horror masterpieces like The Shining and The Evil Dead and The Texas Chain Saw Massacre, and they still leave audiences feeling suitably unsettled by the time the end credits roll.

MORE: Netflix's Texas Chainsaw Massacre Misses The Point Of The Original