Holy Flying Circus to focus on comedians' struggle with church, councils and critics in runup to release of controversial film

"He's not the Messiah, he's a very naughty boy" is one of the most oft-quoted lines in British comedy history. But the religious controversy that engulfed the Monty Python film in which the quote featured, Life of Brian, on its 1979 release was no laughing matter – and is now to be the subject of a BBC drama.

Holy Flying Circus, written by Tony Roche, a co-writer of the political satire The Thick of It, will air this autumn on BBC4 and aims to use the Life of Brian controversy to explore the subject of free speech.

Monty Python's irreverent take on the story of Jesus Christ revolved around Brian Cohen, a reluctant fictional Messiah in first century Judea who is eventually crucified. Church leaders in the US and the UK protested, claiming it mocked Christ, and the film was banned in several countries including Ireland and Norway as well as by several UK local authorities.

BBC4's 90-minute drama leads up the famous Life of Brian debate featuring John Cleese and Michael Palin on the BBC2 show Friday Night ... Saturday Morning, chaired by lyricist Tim Rice.

The film was heavily criticised by fellow guests, the Roman Catholic journalist and satirist Malcolm Muggeridge and the Bishop of Southwark, Mervyn Stockwood, in a series of barbed exchanges. It was later claimed that Muggeridge and Stockwood had arrived late to a screening of the film and did not know that Brian and Jesus were different characters.

In the BBC4 drama Cleese will be played by Darren Boyd, with Charles Edwards taking the role of Palin. Comedian Steve Punt has been cast as Eric Idle, while Terry Jones will be played by Rufus Jones. Tom Fisher has been cast as the late Graham Chapman, who played Brian, while Phil Nichol takes the part of the only American Python, Terry Gilliam.

Jones told the Guardian: "How Muggeridge and the bishop had the gall to slate the film when they'd missed the first 15 minutes is quite extraordinary. It is a very good story."

BBC4 has broadcast a series of dramas based on the lives of British TV and film stars – including Tony Hancock, Kenneth Williams and Hattie Jacques – although the subjects tend to be deceased.

None of the surviving Pythons are involved with the creation of Holy Flying Circus. However, a BBC spokeswoman stressed that they have all been notified about the project and were given time to register their comments or raise objections, which none of them have done.

"Holy Flying Circus is not a biopic, but a fantastical reimagining of the Pythons' struggle with censorship in the runup to the release of Life of Brian," she added. The drama will incorporate "surreal cutaways" including puppetry and animation, according to the BBC.

The script for the independently made Talkback Thames/Hillbilly Television co-production is "witty and humorous in tone", the BBC added.

Richard Klein, the BBC4 controller, said: "This is a smart and witty take on both the nature of censorship and the world of Monty Python. Tony Roche's script is both bold and entertaining, a wonderfully warm homage to one of the most original of British comedy teams."

Co-producer Kate Norrish added: "Holy Flying Circus takes a moment from our recent past to shed light on the present. When Palin and Cleese were called to defend Life of Brian, they were fighting not just for the future of their film but for their artistic credibility. It was a moment when freedom of speech was pitted against religious belief and is a debate that is just as precariously balanced today."

• To contact the MediaGuardian news desk email editor@mediatheguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000. If you are writing a comment for publication, please mark clearly "for publication".

• To get the latest media news to your desktop or mobile, follow MediaGuardian on Twitter and Facebook