After his directorial debut Ted was widely praised by critics and became one of the highest-grossing R-rated comedies ever made, Family Guy creator Seth MacFarlane had the freedom to do whatever he wanted with his next movie. He chose to dive into one of the trickiest genres to pull off in modern Hollywood – the western, whose heyday ended decades ago – with the spoof A Million Ways to Die in the West.

RELATED: 10 Funniest Quotes From A Million Ways To Die In The West

While it’s not a direct parody of any specific western, A Million Ways to Die in the West includes nods and homages to such classics of the genre as The Searchers and Unforgiven.

The Searchers (1956)

John Wayne holding a rifle in The Searchers

The opening and closing shots of John Ford’s seminal western The Searchers – in which John Wayne’s Ethan Edwards arrives in the doorway of his brother’s homestead and later drifts back into the wilderness years later – are two of the most iconic images in film history.

This doorway shot has been recreated in everything from The Godfather to Inglourious Basterds. In A Million Ways to Die in the West, MacFarlane homages this shot when Clinch arrives at Albert’s house.

Montana (1950)

Errol Flynn wearing a cowboy hat in Montana

Most western protagonists are gun-toting antiheroes like cowboys, outlaws, and bounty hunters. But Albert Stark, the hero of A Million Ways to Die in the West, has a decidedly lower-stakes, more sensible career as a sheep farmer.

This is a reference to the Errol Flynn western Montana, in which Flynn plays an Australian sheepherder who comes to the U.S. in search of grazing space and butts heads with standoffish local ranchers.

Back To The Future Part III (1990)

Marty showing his trick shot skills.

While Back to the Future Part III isn’t a western in the traditional sense, Marty McFly’s time-traveling adventure in the Old West does have all the hallmarks of the genre: a train robbery, a black-clad villain, a shootout in a saloon – Robert Zemeckis pulled out all the stops to ensure it would satisfy as a western as well as a Back to the Future movie.

Christopher Lloyd makes a hilarious cameo appearance in A Million Ways to Die in the West reprising his role as Doc Brown. Albert stumbles across Doc working on the DeLorean. A flustered Doc explains it away with his usual lie about a “weather experiment” before exclaiming, “Great Scott!”

Django Unchained (2012)

Jamie Foxx as Django in Django Unchained

In the post-credits scene of A Million Ways to Die in the West, Jamie Foxx makes a cameo appearance as a gunman implied to be the title character from Quentin Tarantino’s spaghetti western gem Django Unchained.

RELATED: 10 Classic Movies Referenced In Django Unchained

Django quips the repeated line from the movie, “People die at the fair,” after shooting somebody dead. It would be great to see Foxx in a real Django sequel someday, but in the meantime, this cameo will do.

The Magnificent Seven (1960)

The cast of The Magnificent Seven outside with guns

John Sturges’ ensemble epic The Magnificent Seven is one of the most iconic westerns of all time, famously translating the story of Akira Kurosawa’s action-packed masterpiece Seven Samurai into an Old West setting.

There’s a subtle nod to The Magnificent Seven in the barn dance scene in A Million Ways to Die in the West. When Anna steals a bottle of whiskey, the band can briefly be heard playing the movie’s theme.

The Lone Ranger (2013)

Armie Hammer and Johnny Depp in the desert in The Lone Ranger

After bringing back swashbuckling adventures with the Pirates of the Caribbean franchise, Gore Verbinski and Jerry Bruckheimer tried and failed to do the same for westerns with a big-budget Disney adaptation of The Lone Ranger.

The scene in A Million Ways to Die in the West in which Albert has a drug trip has been compared to the scene in which fatigue in the desert causes the Lone Ranger to experience dreamlike visions. In both cases, the visions teach the protagonist that their purpose in life is to fight injustice.

Dances With Wolves (1990)

Kevin Costner holding a flag in Dances with Wolves

After fleeing from Clinch and hiding out in the wilderness, Albert meets a group of Native Americans. He gains their trust by speaking their language fluently in a nod to the Kevin Costner hit Dances with Wolves.

The language that Albert speaks is a throwback to Family Guy’s version of Huttese in the Return of the Jedi parody “It’s a Trap!” – including the use of MacFarlane’s co-star Mila Kunis’ name as a foreign phrase.

3:10 To Yuma (1957)

Wade and Evans look at each other in 3 10 to Yuma

Albert isn’t an ice-cool gunslinger like Clint Eastwood’s Man with No Name or a fearless lawman like John Wayne’s Rooster Cogburn; he’s just a mild-mannered everyman.

This non-confrontational characterization is a nod to 3:10 to Yuma. Based on an Elmore Leonard short story, 3:10 to Yuma tells the story of a rancher strapped for cash who takes the unenviable job of transporting an outlaw to justice.

Unforgiven (1992)

Clint Eastwood aiming his rifle in a saloon in Unforgiven

Clint Eastwood’s final western, Unforgiven, provided a perfect swansong for the genre. Eastwood stars as William Munny, an ex-gunslinger who’s reluctantly pulled out of his peaceful life as a rancher and thrown back into action.

RELATED: 5 Ways Unforgiven Deconstructs Westerns (& 5 It Celebrates Them)

The showdown at the ranch in Unforgiven is parodied on Albert’s sheep farm in A Million Ways to Die in the West. Instead of facing the outlaws heroically, Albert hides away in a herd of sheep. The gritty revisionism of Eastwood’s movie is replaced with typical Family Guy scatological humor as a sheep pees in Albert’s face.

Blazing Saddles (1974)

Sheriff Bart holds himself at gunpoint in Blazing Saddles

Just like every musical mockumentary will inevitably be compared to This is Spinal Tap, A Million Ways to Die in the West was inevitably compared to Mel Brooks’ legendary western spoof Blazing Saddles when it first hit theaters. While Brooks’ movie satirizes the genre itself – specifically its whitewashed mythmaking – MacFarlane’s movie satirizes the romanticization of the historical setting.

MacFarlane includes a couple of homages to Brooks’ classic parody in his own movie. The opening credits are styled after the titles from Brooks’ film and Frankie Laine’s iconic Blazing Saddles theme is teased in the end credits of A Million Ways.

NEXT: 8 Ways Blazing Saddles Is A Spot-On Parody Of Westerns