Disney / Hollywood Pictures

In 1999, a creatively fertile year for Hollywood, the most successful movie was an obvious one: Star Wars: Episode I—The Phantom Menace. It came out in May, broke opening-day records, and behaved exactly as a brand-name summer sensation would today. The second most successful film of 1999 was an old-fashioned ghost story from a largely unknown Indian American director. The movie came out in August (then viewed as the doldrums of the blockbuster season) and advertised itself with a poster that listed the five human senses and hinted at a sixth that involved a little boy and was, well, really spooky.

The story of The Sixth Sense’s word-of-mouth triumph is the kind of industry narrative studios still salivate over but used to build their entire financial operations around. Yes, not every mid-budgeted genre picture is going to be a runaway hit, and not every August release will be remembered past its opening weekend. But once in a while, there will be a flabbergasting, market-correcting phenomenon that few could have predicted, one that justifies production companies sinking tens of millions into films that aren’t guaranteed moneymakers.

The Sixth Sense, directed by M. Night Shyamalan and starring Bruce Willis and Haley Joel Osment, is a terrific film. A stately but involving piece of horror that could appeal to all sorts of viewers, it was light on jump scares and crafted with a lovely emotional through line. But that doesn’t fully explain how it became such a juggernaut. The movie made more money than Toy Story 2, than The Matrix, than The Blair Witch Project, than American Beauty—the film that beat it for Best Picture at the 2000 Academy Awards. The Sixth Sense might sound like a one-off smash that can’t be replicated, but its popularity is rooted in some of the oldest moviemaking traditions: plot gimmickry, good salesmanship, and genuine quality.

The film, produced by Disney (under its now-defunct label Hollywood Pictures) and made for a robust $40 million, was No. 1 at the box office for five weeks before being unseated by the much gorier and long-forgotten horror film Stigmata in September. The Sixth Sense didn’t open big and quickly fall off, the economic model for basically every summer movie released these days. In each of its first five weekends, it made $26 million, then $25 million, then $23 million, then $20 million, and then $29 million (over Labor Day weekend). At the time, that financial run was practically unheard-of; the only parallel in recent memory is the smaller (but similarly consistent) moneymaking power of The Greatest Showman.

The simplest explanation for these numbers is the film’s twist ending, which, if you have somehow made it 20 years without learning, be warned: I will reveal it in this article. The Sixth Sense is constructed like a series of short ghost stories, as the child psychologist Malcolm Crowe (Willis) treats 9-year-old Cole Sear (Osment), who can see dead people—spirits walking around and bidding him to help resolve their unfinished business. Malcolm, still haunted by an assault from a former patient he failed and growing distant from his wife, Anna (Olivia Williams), pours himself into Cole’s case, helping him communicate with the souls following him.

Malcolm realizes only at the end of the film that he is himself dead, and that Cole has been helping him process his own demise just as he helped the other phantoms. The Sixth Sense’s screenplay is a quiet, sensitive tale wrapped around a beautiful parlor trick. The film relies on dozens of narrative ruses so that Malcolm never interacts with the other characters, from Anna (who is presented as frosty when she’s actually grieving), to Cole’s mother, Lynn (Toni Collette), who is often in the same room as Malcolm but never actually looks at him.

The power of the twist was twofold. It encouraged new viewers to see The Sixth Sense every week, as others spread word about the surprise ending, but it also spurred people to see the movie again with fresh eyes. Watching as Shyamalan works to not give the game away (at one point, Willis gracefully slides into a restaurant chair without touching it to pull it out, and then Anna grabs the check before he can) is delightful. It’s also gratifying to revisit Willis’s performance, one of his career best, after it’s clear that he’s not playing a tormented man but a mournful wraith.

Even so, plenty of films have shocking conclusions and don’t dominate the year’s box office. The Usual Suspects, which came out four years prior and won two Oscars, is similarly fun to rewatch once you know about its big finale, and while it did well for a small film, it only made $23 million domestically. The Sixth Sense made 10 times as much, partly because it was perfectly marketed, with trailers and TV spots that hinged on the iconic line “I see dead people” and eventually advertised the twist. The ad campaign built up buzz around Willis’s comeback as a serious actor, and around the star-making work of Osment and Collette (who were both Oscar nominees).

Shyamalan himself began to cultivate an air of mystery and quickly became one of the rare directors who can sell a movie on their name alone. He was, perhaps unfortunately, dubbed “the next Spielberg” by Newsweek on the release of his 2002 film, Signs. Though he’s made several other hits, the phenomenon of The Sixth Sense proved difficult for him to move past, especially as he wrote other films with surprising climaxes. Still, the 1999 movie allowed him to keep making his dream projects, acting as a guarantor for risky storytelling gambits.

The Sixth Sense, even with its well-known star, was the furthest thing from a surefire hit, but it surpassed the expected metrics for a midsize ghost story. When I revisited The Matrix, another 1999 classic, I noted how difficult it would be to finance a project like that now, given that it was set in a singular, difficult-to-explain sci-fi world. The same can’t be said of The Sixth Sense. In 2019, a year flooded with softball sequels and in which some original projects have managed to break through, The Sixth Sense is the kind of broadly winning genre hit that could happen again—just look at the money earned by Get Out in 2017. Tales of Hollywood sinking into irrelevance are nothing new, but neither are sensations like this movie; they’re just more likely to happen when studios take chances on strong stories and committed artists.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.