The horror movie “Don’t Breathe” came in number one at the box office this past weekend, becoming the newest spooky film to perform better than industry watchers expected as the horror genre continues to succeed in an often-troubled summer.

“Breathe,” which stars Stephen Lang as a man who is blind and the target of attempted theft, grossed more than $26 million in its opening weekend. “Suicide Squad,” the DC Comics film that had occupied the top spot over the past few weeks since opening in early August, came in second, taking in more than $12 million this weekend.

The animated movie “Kubo and the Two Strings,” which opened on Aug. 19, came in third, grossing almost $8 million, while the animated comedy “Sausage Party,” which originally opened on Aug. 12, placed fourth, taking in $7.7 million this past weekend.

The new action film “Mechanic: Resurrection,” which stars Jason Statham, opened in fifth place, grossing far less than “Breathe” with its opening weekend gross of $7.5 million.

“Breathe” became the newest entry in the horror genre to do better than some industry watchers were expecting during a summer that, in general, has been a troubled one for Hollywood.

In July, the movie “Lights Out” opened with more than $21 million, with Variety writer Brent Lang calling the result “a healthy return” and noting that the horror movie “The Conjuring 2,” which like “Lights” was released by New Line Cinema, had also done well.

This theme was echoed in June as well when the movie “The Shallows,” which stars Blake Lively as a woman threatened by a shark, opened with more than $16 million, a gross that Los Angeles Times writer David Ng wrote beat "industry expectations by about two-fold."

All these spooky films were success stories in a summer that has seen various blockbuster hopefuls underperform. What helped these movies succeed?

Vanity Fair writer Yohana Desta writes, "Horror is still untouchable," noting that it's easy for this summer's frightening films to become successes because their budgets were minor in comparison to some other movies. "The horror story ['Breathe'] joins other successful and scary summer movies, like 'The Conjuring 2,' 'Lights Out,' and 'The Purge: Election Year,' which were also made with relatively small budgets," Ms. Desta writes.

And Beatrice Verhoeven of The Wrap points out that the horror genre is usually a reliable one for Hollywood. "The real winner this season is the horror genre," she writes of this summer. "It's long been a profitable gambit for Hollywood studios, and that trend doesn't show any signs of relenting."