While the two movies are nothing alike in tone, the version of Logan that topped the US box office this weekend likely wouldn’t have been possible if the raunchy superhero comedy that is Deadpool hadn’t come before it.

Deadpool, which like Logan was co-produced and distributed by 20th Century Fox, highlighted a different type of Marvel superhero—the anti-hero—at a time when audiences were ready for it. It earned an R rating in the US, for its strong violence, language, sexual content, and nudity, and was one of the most darkly funny comic-book movies yet.

The movie, about an amoral, foul-mouthed, and disturbingly disfigured super-human mercenary, almost didn’t get made. It was in limbo at Fox (paywall) for nearly a decade until test footage leaked at San Diego International Comic Con in July 2014, and fans flipped for the film.

Shortly after, it was green lit. And in February 2016, it premiered in US cinemas. It became the highest-grossing R-rated film of all time, and broke a litany of other records during its opening weekend. It also earned two Golden Globe nominations, including one for best picture in the comedy or musical genre, and one for Reynolds for best actor in a comedy or musical.

The movie did not get any Oscar nods, despite this excellent “for your consideration” video:

Deadpool’s outsized success is probably what drove Fox to green light Logan as an R-rated, superhero drama—giving Hugh Jackman’s Wolverine the send off his character deserved. While Deadpool was far from the first R-rated comic-book movie, it opened the door for more superhero genres in film outside of the family-friendly blockbusters the fantastical category is known for. It was as violently and inappropriately comical as Logan‘s Western-inspired drama is dark and grisly.

After Deadpool, fans speculated over whether Suicide Squad, in which DC Comics villains like the Joker and Harley Quinn were the protagonists, would seek an R rating. But US film studio Warner Bros. decided to release it as a tamer PG-13 cut, as director David Ayers said he intended it. It was met with mixed reviews but performed well at the box office—and was subsequently released with an unrated cut on DVD.

Logan had an impressive opening weekend at the US box office with $88.4 million in gross ticket sales and fantastic reviews, which was less than Deadpool—but still made for the biggest debut so far this year. So Logan surely won’t be the last superhero film to feature mature content.

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.