Sometimes, it can take quite a while for a movie project to get off the ground. It requires waiting for the right actor to come along for a role, getting the script rewritten so that it’s “perfect,” or finding the right production team to make it magic. Or, sometimes it takes an act so crazy, a studio can’t help wondering if it’ll succeed.

That was the case with Deadpool, a project based on the popular Marvel Comics character co-created by Rob Liefeld and Fabian Nicieza. The smarmy “hero” had been looked at for years to star in his own film, following his appearance in the popular X-Men Origins: Wolverine, but the studio opted to keep it on hold due to its mature (or in the case of Deadpool, not so mature) content – until a curious thing happened.

20th Century Fox funded test footage to get an idea of how a Deadpool movie would work, but it was never meant for public consumption. It was eventually shown during a San Diego Comic-Con panel, but soon after, it made its way onto the Internet through an illegal leak [shown above]. As a result, the footage went viral, and fans went crazy over the idea of seeing a Deadpool movie. The concept was so successful that much of the scene made it into the movie and has been featured in numerous promotional trailers (like the one below).

Ryan Reynolds, the actor portraying the character, spoke about the leak during an appearance on Late Night With Jimmy Fallon. “I’ve been trying to get (the movie) made for 11 years, which is crazy,” he explained. “We developed the script six years ago, wrote this fantastic script, it leaked online, Deadpool fans went nuts for it.”

He explained how the studio funded the footage and its leak, and the effect that followed. “Here’s the thing, the fans freaked out and overwhelmed Fox, and Fox basically had to greenlight the movie. The problem is the footage was owned by Fox, so it was kind of illegal…I know that one of us did it.” He then joked he was “70 percent sure” it wasn’t him.

Still, it’s wild regarding the effect the viral footage has had, as Fox granted a $58 million budget for the film (smaller than most of the $200+ million films that Marvel Studios produces) and backed it with a viral marketing campaign, ranging from appearances in commercials (like the eSurance Super Bowl ad) to massive online pushes, including one that indicates that Deadpool is a love story – similar to some of the fare Reynolds has made in the past.

Deadpool 2

It’s a move that’s certainly paying off for the company. The film has already grossed $47.5 million for Friday, and is expected to reach around $120+ million for the overall weekend – a high number for an R-rated film. And Fox, anticipating its success, has already laid the groundwork for a potential sequel.

One thing’s for sure, Deadpool is an example of how something viral can lead to a bigger success in the film industry – even if it wasn’t entirely by legal means.

Deadpool is in theaters now.