Bill Murray confronts a gopher in 1980's "Caddyshack."

Bill Murray confronts a gopher in 1980's "Caddyshack." Credit: Allstar Picture Library Ltd. / Alamy Stock Photo

It seemed like a recipe for disaster: Take three hard-partying comedians and one first-time director. Put them on a Florida golf course with a $6 million budget. Add cocaine. Shake well.

The result: “Caddyshack,” Harold Ramis’ gloriously anarchic comedy that was released on July 25, 1980. Nothing about it should have worked — yet, somehow, everything did.

Forty years later, “Caddyshack” still stands as the quintessential summer comedy: rude, crude, unabashedly juvenile. Critics dismissed it as a slapdash copy of 1978’s “Animal House,” which of course it was. But nobody could deny that its three stars — “Saturday Night Live” alums Bill Murray and Chevy Chase, plus stand-up comic Rodney Dangerfield — were firing on all cylinders, riffing in every scene and coming up with pure gold. If the whole movie seemed like a big, happy, drug-fueled accident, well, it pretty much was.

The screenplay, written by Ramis and Douglas Kenney (both of “Animal House”) and Brian Doyle-Murray (Bill Murray’s brother, who plays a small role), isn’t much to speak of. Its hero is Danny Noonan (Michael O’Keefe), a young golf caddie hoping to win a scholarship from the posh Bushwood Country Club, where he works. Meanwhile, tacky businessman Al Czervik (Dangerfield, in eye-watering plaid) barges into the club, horrifying such upper-crust members as Judge Smails (a never-better Ted Knight). Popping in and out of the story are Ty Webb (Chase), a glib golf pro, and Carl Spackler (Murray), a mentally unbalanced groundskeeper trying to assassinate a gopher.

None of it adds up, but as Murray said in “Meatballs” (another predecessor to this movie): It just doesn’t matter! We have Dangerfield, firing off one-liners like “This guy keeps calling me a baboon, he thinks I’m his wife!” We have Chase, whose chaotic sex-scene with Cindy Morgan (as Lacey Underall) rivals the great routines of Groucho Marx and Margaret Dumont. And we have Murray, reportedly working entirely off-script; his famous “Cinderella story” monologue was improvised on the spot. Last but far from least is Ted Knight, rising above his straight-man role with a masterful performance of stuffed-shirt bloviation.

It isn’t just coherence that Ramis throws out the window, but basic realism. In the club’s swimming pool, a dozen slobs suddenly perform a synchronized water-ballet. Czervik carries a high-tech golf bag that rockets his clubs into the air. And let’s not forget that gopher, who burrows across the greens like Bugs Bunny and dances to the Kenny Loggins theme song, “I’m Alright.”

“Caddyshack” is clearly meant for males — more accurately, for pubescent boys. That means we get one of cinema’s finest poop jokes (the Baby Ruth in the swimming pool), but it also means women get short shrift. They exist mostly to show us their bodies and give us a contraband thrill, like finding a porn magazine in dad’s closet. The nudity surely helped sell tickets, but it’s also a limiting factor. If not for the sex and drugs on screen, “Caddyshack” would be heaven for just about any 12-year-old.

Drugs, though, were baked into the movie: Both and cast and crew were often high as kites during production. O’Keefe, in a recent interview with People magazine, said lunchtime also meant cocaine time, and Murray was known for his overnight benders. The substances may have fueled the magic. Still, one dark cloud trails the movie: Co-writer Kenney spiraled into drink and depression following the negative reviews, and weeks later fell to his death from a cliff in Hawaii.

Had Kenney lived, he would have seen “Caddyshack” snowball in popularity to become one of the best-loved comedies of the modern era. Warner Bros. released a 1998 sequel, “Caddyshack II,” with only Chase reprising his role, but the spark was gone. “Caddyshack” remains a lightning-in-a-bottle moment, unlikely ever to be repeated.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME