Forty years ago, as the newly elected prime minister Margaret Thatcher enjoyed her popularity honeymoon, middle England boiled with rage at reports of the new Monty Python film, about a hapless People’s Front of Judea activist who is mistaken for the son of God. This was a cheeky satire of the life of Jesus. Or a satire of Biblical movie epics, or a satire of organised religion, or a satire of social conformism – these being some of the emollient, diversionary explanations deployed at the time by the film’s supporters to appease the censors and outrage merchants. They didn’t buy it. Rightly so. It’s a satire of the life of Jesus.

The film sparked one of many bad-tempered banning rows of that era, coming after Mary Whitehouse’s successful private prosecution of Gay News over James Kirkup’s poem The Love That Dares to Speak Its Name in 1977 – Python star Graham Chapman was an early supporter of the paper – and before her failed action against Howard Brenton’s play The Romans in Britain at the National Theatre in 1980. And then, nine years after the film’s release, Salman Rushdie published The Satanic Verses and the Python/blasphemy debaters realised that they had been playing under some very quaint Queensberry rules.

Monty Python’s Life of Brian still stands up as an amazing achievement, the Pythons’ masterpiece: a 90-minute sketch elevated to an entirely consistent, hugely audacious and ambitious film, shot in Tunisia on sets used for Zeffirelli’s Jesus of Nazareth, with £3m of George Harrison’s money provided after EMI Films nervously withdrew its backing. There are tremendously funny set pieces and brilliant visual moments. The point-of-view shot of Brian’s mother as she opens the window to see the ecstatic masses outside her hovel, is superb.

Part of the Pythonic comedy revolution before this had involved not caring about endings: sketches got interrupted by people declaring it to be silly; Monty Python and the Holy Grail (1975) had ended in the same anarchic way. Life of Brian was different. It had a truly spectacular and conventionally satisfying ending: the crucifixion scene, reimagined as a musical comedy finale staged in breathtakingly bad taste, with Eric Idle’s jaunty song Always Look on the Bright Side of Life composed in his quasi-Sandy Wilson style. It is preceded by a clever and underappreciated riff on the “I’m Spartacus” moment, as every one of the crucified thieves claim to be Brian – just pardoned by Pilate – to get themselves off the cross.

Other moments have rightly become the stuff of comedy legend. Brian’s mum saying “He’s not the messiah; he’s a very naughty boy” and “There’s a mess here, but no messiah” ­– lines that have become loved because they sound like things thought up by ordinary people, as opposed to comedy writers.

Roman ridicule … Life of Brian. Photograph: Ronald Grant

Then there is the stoning scene, something with a queasy ultra-modern relevance in view of Brunei’s murderous homophobia. The argument about how Brian should translate Romans Go Home into Latin (“Romani Ite Domum” not “Romanes Eunt Domus”) is hilariously surreal, as are the factional-revolutionary disputes between the People’s Front of Judea, the Popular Front of Judea and the Judean People’s Front and the now legendary argument about what Rome has done for its colonised peoples that turns into a bleak commentary on our love of authority: “If we didn’t have crucifixion, this country’d be in a right mess.”

Could it be done now? In 2019, the nature of censorship and self-censorship has changed. The speech-impediment gags would be a tricky sell, some of the language that Brian angrily uses to come out as Jewish feels misjudged and the material about the transgender character might get the Pythons into a whole new world of trouble.

But what a triumph this film was for Chapman, who gave a convincing, touching performance as the bewildered everyman who decides to make a stand, and in his battle with the evil empire makes a Luke Skywalker-style discovery about his lineage. Life of Brian is an unexpectedly earnest, sweet-natured hymn to the idea of tolerance.