The Farrelly brothers upended the usually schmaltzy tone of the romantic comedy with There’s Something About Mary, a grossout, slapstick, absurdist masterclass. Ben Stiller and Cameron Diaz were both catapulted to stardom by the film’s success, and it’s allowed the Farrellys to continue making movies to this day, even with rocky output like Hall Pass and Dumb and Dumber To.

RELATED: 10 Most Savage Quotes From There's Something About Mary

There’s Something About Mary is a rare comedy that manages to use crass subject matter and slapstick gags without feeling lazy or uninspired. It’s everything that the Seltzer/Friedberg oeuvre has failed to be. So, here are 10 fascinating facts from the making of There’s Something About Mary.

THE FARRELLYS MADE THE FILM LIKE IT WOULD BE THEIR LAST

Ben Stiller in There's Something About Mary.

After making a movie that bombed, Kingpin, the Farrelly brothers figured they’d only get to make one more movie. So, they set out to write an over-the-top, balls-to-the-wall, absurdist take on a cliché-ridden romantic comedy, which Bobby Farrelly has described as When Harry Met Sally meets Blazing Saddles.

Oddly enough, this is the same technique that led to Raging Bull being so beautiful; Martin Scorsese poured his heart and soul into it, assuming it would be his final work. There’s Something About Mary was a box office smash, so the Farrellys got to keep their career path intact (for better or for worse).

THE ZIPPER GAG WAS BASED ON A REAL-LIFE INCIDENT

Ben Stiller in There's Something About Mary, looking like he is in pain

One of the most famous gags in There’s Something About Mary – second only to the notorious “hair gel” mix-up – is Ted getting his “frank and beans” stuck in his zipper. This scene was based on a real-life incident in which the Farrelly brothers’ parents had to help out a kid who’d gotten his genitals caught in his zipper at one of their sisters’ parties.

Furthermore, Warren was inspired by the Farrellys’ neighbor, Warren Tashjian, who cameos in the movie. Mary’s stepdad was inspired by the Farrellys’ father, who would pull similar pranks on their sisters’ dates.

JIM CARREY AND COURTENEY COX WERE CONSIDERED FOR THE LEAD ROLES

Ace Ventura

Playing the lead roles in There’s Something About Mary shot Ben Stiller and Cameron Diaz to the top of the A-list. Stiller was always the Ferrellys’ first choice to play Ted, but the studio was reluctant to cast him. Their second choice was Owen Wilson, and the studio was even more reluctant to cast him, so they let the Farrellys cast Stiller after all.

Jim Carrey and Jon Stewart were also considered for the role of Ted. Courteney Cox was considered to play Mary, and Chris Farley auditioned to play Warren.

THE FARRELLYS RECYCLED SOME DIALOGUE FROM AN UNPRODUCED SEINFELD SCRIPT

The dialogue between Ted and Mary when they talk about how there aren’t enough meats on sticks was recycled from a Seinfeld script that the Farrellys wrote that was never produced. They still liked the dialogue, so they included it in this movie.

RELATED: Seinfeld: 5 Episodes About Nothing (& 5 Episodes That Actually Addressed Something Real)

The duo’s only produced Seinfeld episode was season 4’s “The Virgin,” the events of which directly impacted “The Contest,” which is widely considered to be the show’s finest episode.

KEITH DAVID IMPROVISED A LOT OF HIS DIALOGUE

Keith David ad-libbed a lot of his dialogue in There’s Something About Mary, included his iconic line about a “can of whoop-ass.”

Brett Favre also came up with his own line – “I’m in town to play the Dolphins, you dumbass” – because he didn’t like the lines that were written for him.

CAMERON DIAZ HAD A BETTER GOLF SWING THAN HER PROFESSIONAL STAND-IN

Cameron Diaz in There's Something About Mary

For the scene in which Mary practices her golf swing down at the driving range (the Aqua Golf Range in Pembroke Park), Cameron Diaz had a professional golfer as a stand-in for when she actually swung the club.

However, according to Peter Farrelly, Diaz turned out to have a better swing than the professional golf player who was hired to stand in for her.

DROPPING TED’S STRETCHER WAS A GENUINE ACCIDENT

As Ted is taken away on a stretcher, the paramedics drop the stretcher as they load it into the back of an ambulance. This might seem like a visual punchline, adding insult to Ted’s injury, but it was actually a genuine mistake.

The crew cut as soon as it happened to make sure Ben Stiller was okay, but when they resumed filming, they played off the fall. This wasn’t the only injury incurred by Stiller during the shoot: he also hit his head on the chair leg when he was being attacked by Puffy.

BRETT FAVRE WAS THE DIRECTORS’ THIRD CHOICE FOR THE MOVIE’S FOOTBALL PLAYER CAMEO

There’s Something About Mary was always going to feature a famous NFL player as one of the title character’s many suitors, but Brett Favre was actually the producers’ third choice.

RELATED: 10 Most Memorable Times A Celebrity Played Themselves In A Movie

The first choice was New England Patriots quarterback Drew Bledsoe, who later regretted turning down the offer. The second choice was 49ers quarterback Steve Young, who turned it down because he didn’t want Mormon children to sneak into an R-rated movie to see him on the big screen.

BILL MURRAY WAS DEEMED TOO OLD TO PLAY PAT HEALY

The Farrellys’ original casting choice for the role of Pat Healy was Bill Murray, who they’d just directed in Kingpin. However, they later decided that he was too old for the part, and started searching for a younger actor.

They considered Vince Vaughn, Cuba Gooding, Jr., and Hank Azaria for the role before casting Matt Dillon and giving him a career comeback.

THE SCRIPT’S ORIGINAL ENDING WAS EXTREMELY DARK

Cameron Diaz in Something About Mary

The original script for There’s Something About Mary called for an ending that was a lot darker than the more conventional conclusion to the story that appears in the final cut. Instead of going with the traditional happily-ever-after ending, there was originally a moment right after Mary chooses Ted out of her gaggle of romantic suitors in which Ted was hit by a bus.

This would be a neat subversion of rom-com clichés, but it would come at the cost of changing the whole tone of the film in a pretty soul-crushing way.

NEXT: Kick His Ass, Sea Bass!: 10 Behind-The-Scenes Facts About Dumb And Dumber