It was a foregone conclusion that Quentin Tarantino would one day produce his take on the spaghetti western. There are glimpses of this distinctive genre’s style in many of his films, most prominently Kill Bill: Volume 2 and Inglourious Basterds, and he has frequently heralded Sergio Leone’s masterpiece, The Good, The Bad & The Ugly as his favourite film of all time. And lo and behold, Django Unchained, the story of a freed slave and German bounty hunter who team up to rescue the former’s wife from a dastardly plantation owner, is a rip-roaring celebration of the violent, operatic, exploitation flicks of the 1960s. What nobody expected was that it would also be a full-on assault on America’s shameful past.

Tarantino opens his film with the theme song from Sergio Corbucci’s 1966 film, Django, which spawned dozens of sequels, cash-ins and imitations – including, perhaps, this one – and digs up original star Franco Nero for a brief, yet knowing cameo. The director has never been ashamed of name-checking his influences, but this might be his most overt acknowledgement to-date, although his eponymous hero is a far-cry from Nero’s coffin-dragging gunslinger. As Dr. King Schultz (Christoph Waltz) points out, Tarantino’s Django (played by Jamie Foxx) bears more of a passing resemblance to the classic German hero Siegfried (whose deeds are depicted in Fritz Lang’s silent epic, Die Nibelungen), to the extent that his quarry – in this case Django’s wife – shares the name Broomhilda.

Standing between our hero and his lady love is slave master Calvin Candie (a despicable performance from a never-better Leonardo DiCaprio), and a country still wallowing deep in racial prejudice that forbade the likes of Django from riding a horse or entering a bar. Set in 1858, two years before the very issue of slavery would set the country against itself in a bloody Civil War, Tarantino never balks from digging up the very worst aspects of this culture and laying them bare in front of his audience. As a result, Django Unchained has unsurprisingly attracted plenty of criticism for its language and at times exploitative depiction of violence against the black community, but Tarantino’s intention is always to shock and revile the viewer, as these words and deeds rightly should.

After all, this is a Quentin Tarantino movie, and as we have learnt – most explicitly from Inglourious Basterds – he is not about to let historical fact get in the way of telling a great story. While some labelled that movie a Jewish Revenge Fantasy, the same could easily be said of Django, as it depicts African-American retribution writ large, loud and flashy, through the lens of Robert Richardson and to the beat of Tarantino’s predictably eclectic jukebox. Needless to say, Tarantino draws from literally dozens of other films – be they Westerns, Blaxploitation thrillers or otherwise – to tell his story, and imbues each character with a rapier wit and a penchant for loquacious dialogue and pithy one-liners.

True to form, Tarantino has assembled a stellar cast of both A-list talent and nostalgic character players to populate his film, and with the sole exception of his own hackneyed acting talent (a career-defining trait in itself), everyone on screen delivers fantastically. Leading the way is Jamie Foxx, who pitches his victimized yet resolute hero perfectly. Persecuted and impoverished, heroic yet far from infallible, Foxx plays Django as a man who is confident yet scared, angry yet cautious, determined in his mission, yet lost at sea in a society that has all but refused to acknowledge him as a human being. The narrative takes him into even more challenging and confused territory as it unfolds, and it is to Foxx and Tarantino’s credit that Django remains likable while also frightening.

It has been close to two decades since Leonardo DiCaprio last took on a supporting role, and never has he come close to portraying anyone as singularly evil as Calvin Candie. Born and raised on the Mississippi plantation known as Candieland, the depths of his racism and prejudicial worldview reach an almost genetic level. Candie knows no other world than that in which he is lord over all he prevails, which consists almost solely of “black faces” who are to him property, not employees – and most certainly not people. It is a courageous move on DiCaprio’s part, who has never taken the easy route to success, and has almost always benefitted from his gambles. Candie is destined to go down in Hollywood history as one of the great screen villains, certainly the most memorable since his co-star Christoph Waltz’s Col. Hans Landa from Tarantino’s last film, or perhaps Heath Ledger’s Joker from The Dark Knight. Candie lacks a single redeeming feature, and just when you think he can be no worse, he outdoes himself yet again.

While it was a great shame to see DiCaprio’s incredible work go unrecognized by the Academy earlier this month, there is no denying that the star of Django Unchained is Christoph Waltz. The unknown Austrian television actor became an overnight success at the 2009 Cannes Film Festival, when he won Best Actor for his turn as the charismatic Jew Hunter in Inglourious Basterds – a part that originally attracted the attentions of DiCaprio. As he overshadowed the likes of Brad Pitt and Michael Fassbender then, here he rises above Foxx, DiCaprio and Samuel Jackson, who is rather brilliant as Stephen the houseboy, to again steal the film. His German-born bounty hunter, Dr. King Schultz, who masquerades as a travelling dentist while making a living “selling corpses” provides Django Unchained with its moral compass.

Schultz sees how wrong slavery is, while acknowledging how ingrained it is within American society. He is driven by money through murder – and at one point even admits the similarities between his own profession and the slave trade – but over the course of the film we see him wrestle with his conscience. He gives Django his freedom, treats him as a man rather than a commodity, even pleads for his life on more than one occasion, and at no point does Tarantino let him get away with pontificating or trading on 21st Century values. It all happens within the context of a society for whom it is largely an alien concept. And more often than not, Schultz does so whilst being extremely erudite, humorous and also, in his own way, something of a badass.

In many ways this is Tarantino’s most ambitious film to-date, and while for the most part his 165-minute epic is thrilling and consistently entertaining, there is no denying that the loss of his regular editor, Sally Menke, has had a negative impact on his work. That is not to say that Fred Raskin does a bad job cutting the film, on the contrary it is well-paced throughout, but it feels that Tarantino has lost a key collaborator who had the power to tell him “No”. There is simply too much of Django Unchained, and some viewers will find it an overwhelming experience. The violence, in particular, is incredibly bloody, and the moments designed to shock, rather than celebrate bloodshed – which are very clearly differentiated – do so with unflinching ferocity.

The film’s biggest single problem, however, is its ending. Without spoiling anything, it simply goes an act too far, when it could have closed with the exact same resolution 15 minutes earlier and would have done so spectacularly. As is, Tarantino insists on taking a breather after the climactic shootout, for a wholly unnecessary sequence that will have audiences kicking their heels and wincing at the director’s diabolical Australian accent, only to then return for the finale he should have staged quarter of an hour ago. The moment is lost and the final pay-off never quite hits the high note it deserves.

But this is a minor quibble in a film that is an absolute blast, both for Tarantino fans as well as aficionados of Spaghetti and more traditional Westerns. Packed full of the director’s trademark witty exchanges, cultural observations and playful anachronisms, Django Unchained spills over with the boyish unchecked enthusiasm of arguably the world’s greatest working cinephile, and will leave viewers itching to explore the darker, more diverse areas of the genre that inspired this Deep South adventure.