Mel Brooks began his string of genre parodies by taking aim at the western in this patchy but generally hilarious spoof. It rips into not just the western and all its conventions, particularly those of the generic B-movie variety, but the racist attitudes that not only prevailed in the Old West but in 1970s America. It rides roughshod over through the conventions of the western, plundering every clichĂ© worth mining (“you’d do it for Randolph Scott”) and parodying the genre with some real affection.

The plot is episodic in the extreme. In 1874, a new railroad is being built across the west that will mean the destruction of the town of Rock Ridge. Attorney General Hedley Lamarr (Harvey Korman), who is repeatedly mistaken for actress Hedy Lamarr (she sued the producers when she got wind of what they were doing, resulting in the “this is 1874, you’ll be able to sue her” gag being inserted during production), plans to make a fortune by scaring off the residents and claiming the land for himself. He sends in his armed thugs, led by the idiotic Taggart (Slim Pickens), to kill the sheriff and manipulates Governor William J. Le Petomane (Brooks himself) into appointing a black man, Bart (Cleavon Little), to replace him, hoping that his presence will so offend the townspeople that they will abandon the town. Bart meets a predictably hostile reception from the people of Rock Ridge and forms an alliance with washed-up, drunken gunfighter The Waco Kid (Gene Wilder). Will Bart be able to win over the townspeople and expose Lamarr’s dastardly plans?

Cleavon Little, sporting a nice line in velvet suits, is great as the laid-back Bart, never rising to the baiting of the idiot bigots and always coming out on top. He makes a great double-act with the equally cool Wilder as The Waco Kid who plays less manic than usual to great effect. The supporting cast is a riot, from Brooks’ cross-eyed, lunatic governor to Slim Pickens’ thick-as-a-brick sidekick Taggart and Harvey Korman’s camp schemer Hedy (“that’s Hedley”) Lamarr. Madeline Kahn’s German accented Lili, “the Teutonic titwillow,” is a one-note joke that wears thin after a while though sadly.

They’re gifted some great dialogue from Brooks, a string of classic one-liners that are eminently quotable. The jokes come so thick and fast that there’s always something to laugh at, with another gem coming along when the few duds fail to land. There are lots of little details to offset the grosser set pieces like the famous bean-wating campfire scene – look, for example, for the wedding portrait on the wall of Le Petomane’s office, the bride and groom painted with their backs to us, possibly in shame.

Good taste was left at the door and there’s much here that offend more sensitive tastes – the repeated use of the n-word has been cause for much complaint then and now, though Brooks always maintained that both Little and stand-up comic Richard Pryor, who co-wrote the script with Brooks, Norman Steinberg, Andrew Bergman and Al Uger, had no problems with it in context. Indeed the film is much quicker to poke fun at the bigots of Rock Ridge than it is to demean Bart and his fellow black and Chinese workers. In some respects, the film echoes the 1969 novel Yellow Back Radio Broke-Down by Ishmael Reed, whose protagonist was also a smooth-talking black man in the Old West.

The plot, such as it is, unravels just at the moment when it surrenders completely to the fantastic. There had ben plenty of absurdist gags, anachronisms and The Kid’s almost supernatural abilities with a gun in the early part of the film but at the climax, it shatters the fourth wall, the cast spilling out onto the backlots of the Warner Bros. studios and interacting with other films in production, including a Busby Berkeley-style musical. It degenerates into a custard pie fight before getting weirder still as Bart, The Kid and Lamarr end up in a cinema watching the events of the film as they descend on the very building they’re sitting in.

It’s a scrappy ending that lets down the episodic but generally very enjoyable spoof that makes up the film’s first two acts. It feels somewhat desperate, as if after a non-stop parade of bad taste gags, excess and abject silliness, Brooks couldn’t think of any sensible way to finish the film. His later genre spoofs may have been variable in quality but at least they stayed more focussed than Blazing Saddles, which loses its way when it stops taking pot shots at the western.

But when it works, it works brilliantly and Bart was a popular enough character to inspire a pilot for a television sitcom spin-off, Black Bart, with Louis Gossett Jr taking over the role. It was broadcast on 4 April 1975 and then disappeared from sight for many years, eventually surfacing as an extra on the 30th anniversary DVD/blu-ray release of Blazing Saddles.

Blazing Saddles was released in February 1974 and by the end of the year Brooks had released the even better Young Frankenstein, doing for Universal monsters what Blazing Saddles had done for the Old West. It in turn was followed by a whole string of similar spoofs tackling silent cinema (Silent Movie (1976)), Hitchcockian thrillers (High Anxiety (1977)), historical epics (History of the World, Part I (1981)), science fiction (Spaceballs (1987)), swashbucklers (Robin Hood: Men in Tights (1993)) and vampire films (Dracula: Dead and Loving It (1995)).