Mike Myers’ beloved portrayal of the large green ogre in Shrek almost didn't happen since the studio originally hired someone else for the part. Shrek followed the life of a frightening ogre living alone in his swamp when Lord Farquaad banished all fairy tale creatures to his land. To free his home from the intruders, Shrek and Donkey embarked on a quest to rescue Princess Fiona from her fiery tower. The film, which opened with Shrek using a page from a storybook as toilet paper, was meant to subvert topes from popular princess movies.

At the time, most films based on fairy tales featured beautiful princesses in their lead roles, but the character of Shrek was an ugly, bitter ogre who had no interest in anyone other than himself. His entertaining friendship with Donkey and blossoming romance with Princess Fiona created a solid premise that spawned a successful franchise for DreamWorks. Yet, the real heart of the film rested with Shrek’s prickly personality. It is hard to imagine the character portrayed by anyone else, but that was almost what happened.

Related: Rick and Morty Sneakily Mocks (and Celebrates) The Shrek Franchise

Casting for Shrek initially hired comedian Chris Farley, who unfortunately passed away before the movie was finished. Writers Terry Rossio and Ted Elliot had actually based Shrek and Donkey’s relationship on Farley and David Spade’s in the 1995 film Tommy Boy (via Uproxx). Having written Shrek’s character with Farley in mind, it made sense to approach the specific actor for the part. Farley had already recorded many of his Shrek lines before his death forced the studio to recast. With Farley gone, DreamWorks executives opted to rewrite the script with a version of the character that did not so closely resemble the late actor. Shrek became older and grumpier and required someone skilled at humor to endear such an unlikeable person to the audience. Having worked alongside Farley on SNL, Myers’ extensive comedic experience made him the perfect choice.

Chris Farley

Shrek would have been a very different movie without Myers. In an interview (via Yahoo Entertainment), Farley's brother Kevin shared that his portrayal of Shrek was more of a “bumbling innocent guy,” just like Farley. He did not want to frighten people; he wanted to help them. Myers also loved the story’s uplifting message that everyone is beautiful. His passion for the role undoubtedly inspired his idea to give Shrek a Scottish accent. He had already finished filming by then but felt that his character’s voice was too similar to Lord Farquaad’s English accent. To the animators’ despair, Myers redid his lines in a Scottish one to better distinguish the two characters. This edit certainly paid off, considering Shrek’s long-lasting success.

Some other actors considered for Shrek include Bill Murray and Nicolas Cage. Before DreamWorks was even founded, early ideas for Shrek paired Murry with Steve Martin voicing Donkey. During the actual casting process, Cage was offered the part before Myers. He turned it down because he did not want to look like an ogre—a rather ironic reasoning considering the film’s lesson to look beyond appearances.

Although Shrek began on shaky ground, with animators struggling on the highly anticipated The Prince of Egypt sent to work on Shrek instead, the movie won the first Academy Award for Best Animated Feature. Its success has led to four feature films as well as spin-offs, holiday shorts, and video games. After much stalling, a fifth Shrek movie is also allegedly in the works. In 2015, some of Farley's recorded footage was leaked online, providing a bit of insight into the type of film he would have made. Though Farley never got the opportunity to do the role, Myers’ unique approach to the title character worked out for all involved.

More: Shrek: Why Robin Hood Is French