Boy, did the box office need this one. After the weakest Labor Day weekend since the turn of the century, Warner Bros./New Line Cinema’s “It” came in and outperformed not only the optimistic analyst projections, but also the entire four-day revenue from last weekend with a $117.1 million opening.

With that result, “It” narrowly beats out “Spider-Man: Homecoming” for the third-biggest opening of 2017, and more than doubles the record set by “Hannibal” for the biggest horror movie opening of all-time. With strong reception from critics and constant, positive word-of-mouth keeping the money pouring in, “It” is just the latest and greatest success story in what has been an impressive year for horror with films like “Get Out,” “Split” and “Annabelle: Creation.”

It remains to be seen whether “It” can perform as well in the coming weeks as other WB films like “Wonder Woman” and “Dunkirk” have after their openings, as horror movies tend to be front-loaded when it comes to their box office performance. But it has as good a shot to be a Halloween moneymaker, as WB and New Line have turned this remake into a must-see film thanks to a solid marketing campaign and the quality work by director Andy Muschietti and his team that capitalized on the hype. Here’s how they got there:

Also Read: Could 'It' Float a Franchise? Pennywise Looks Like a Smart Investment

1.) Strong trailers

The hype for “It” can be traced back to the end of March, when the first trailer for the film was released. Featuring a glimpse at director Andy Muschietti ‘s spin on the infa mous rain gutter scene, the trailer has been seen over 34 million times on YouTube and helped pique interest in the film in all demographics several months in advance. Over the summer, many under-performing films had either the hype or the good reviews, but not both. Like its fellow WB films “Wonder Woman” and “Dunkirk,” “It” had both. And on top of that, it had a marketing team that knew how to handle its villain…

2.) Pennywise

In the first trailer and poster, Pennywise’s evil visage couldn’t be seen except for a few quick frames. Tim Curry’s legendary portrayal of Pennywise has become a frequent inspiration for internet memes, so naturally there was interest in how Bill Skarsgard’s version of the killer clown would look and act.

For about a month, WB and New Line kept Pennywise under wraps, obscuring his face with his signature red balloon. Then, once his character was revealed, the marketing doubled down on his new look, with posters featuring him in all his carny glory and trailers that showed him terrorizing the children in attics and sewers. By slowly teasing out the new Pennywise with intrigue and terror, WB kept the interest going through the summer months.

[powergridprofile powerrank=”1945” node=”458260” type=”project” path=”http://powergrid.thewrap.com/project/it-2017” title=”It (2017)” image=”it.png”]

3.) Unique marketing

On top of that, special marketing events allowed the most hardcore Stephen King fans to come face-to-fac e with Pennywise in a variety of ways. Foremost among these was an immersive haunted house set up on Hollywood and Vine. Meanwhile, fans not in Los Angeles could try out a virtual reality experience that took them on an intense ride inside Pennywise’s sewer pipes.

While other films like “The Mummy” have tried this marketing, “ It ” was able to mak e it work because it had the trailers and familiar adaptation material as a strong foundation to generate interest in the immersive fan experiences. Now th rill-seekers could plunge themselves deep into the same horror that filled those trailers, and that experience, in turn, generated more interest to see the film.

Also Read: AMC Theatres CFO: There Is a 'Day of Reckoning' for MoviePass Strategy

4.) September is more than a “dumping ground”

It can’t be said for sure what sort of opening “ It ” would have had but it certainly would have helped stop the bleeding suffered by the weakest summer box office season in over a decade.

But of all the companies in Hollywood, Warner Bros. was the one stressing out the least this summer. After putting out a bomb with “King Arthur: Legend of the Sword” in May, the studio has put out successful films in each of the past three months: “Wonder Woman” in June, “Dunkirk” in July and “Annabelle: Creation” in August. “Annabelle” was the sole pos iti ve result last month, making $35 million in its opening weekend — a solid result for a horror film — and is on pace to cross $100 million domestic this coming week.

With those movies continuing to bring in audiences through summer’s end, early September became the perfect release slot for “It.” While “Annabelle: Creation” was a horror movie that appealed to hardcore genre fans, “It” has crossover appeal, reaching out to moviegoers that haven’t had a must-see film on theater slates since “Spider-Man: Homecoming” and “Dunkirk” came out two months ago. Audience demographics have shown widespread interest in the film, with gender breakdown virtually split 50-50 while 65 percent of moviegoers were over the age of 25.

Also Read: 'Blade Runner 2049' Prequel: Learn About Motives of Jared Leto's Villain in New Short (Video)

5.) The “Stranger Things” factor

But the appeal of “It” to a wide audience — and particularly to Gen Xers — shouldn’t be surprising considering the success of last year’s big Netflix hit, “Stranger Things.” “It” certainly lends itself to comparisons to “Stranger Things,” particularly considering that the show’s star, Finn Wolfhard, also appears in this movie. “Stranger Things” creators Matt and Ross Duffer also list Stephen King’s novel as an inspiration for their show.

But on top of the similarities between two stories about kids facing unspeakable horrors, both “It” and “Stranger Things” appeal to nostalgia for 80s pop culture. While Stephen King’s novel sees the Losers take on Pennywise in 1950s Maine, Muschietti’s version places the story in the 80s and, like “Stranger Things,” makes several cultural references to that decade. That change only further connects the story’s environment to the one many 80s kids were immersed in when they sat in terror watching Tim Curry’s Pennywise do his macabre antics on a TV miniseries that gave many young minds their first taste of R-rated intensity.