Daniel Mays has been cast as the lead in BBC2's Against The Law, playing a man whose crusade helped lead to the repeal of anti-homosexual laws in the 1960s

Daniel Mays has been cast as Peter Wildeblood in BBC2 docu-drama Against The Law, the story of a man whose experiences and writing in 1967 helped repeal the law that made homosexuality an imprisonable offence.

Daniel, who has starred in Mrs Biggs, Line of Duty and the recent Dad’s Army film, will play the thoughtful and private gay journalist whose lover Eddie McNally (Richard Gadd), under pressure from the authorities, turned Queen’s evidence against him in one of the most explosive court cases of the 1950s – the infamous Montagu Trial.

More than 10 years before the decriminalisation of homosexual acts in 1967, Wildeblood, and his friends Lord Montagu and Michael Pitt-Rivers, were found guilty of homosexual offences and jailed. But he emerged from Wormwood Scrubs determined to change these laws.

Mrs Biggs star Daniel said: “I’m incredibly proud to be part of a drama that tells such an important real-life story. Peter Wildeblood is a fascinating, complex, yet flawed character from a time when being a gay man in Britain was incredibly difficult. I can’t wait to bring his tale to life for the BBC2 audience.”

BBC2 channel editor Patrick Holland said: “Fifty years ago, it was a crime to be a gay man in the UK. Against The Law is a stunning piece that melds drama and documentary testimony to tell the story of one man, and his wider generation, as they struggled to make society accept their sexuality as non-criminal.

“It is brilliant to have a film that brings the authorship of Brian Fillis, the vision of director Fergus O’Brien, and the outstanding talent of Daniel Mays and cast to this important subject”

The drama also features Mark Gatiss (Taboo, Sherlock) as Wildeblood’s prison psychiatrist, Doctor Landers and Charlie Creed-Miles (Ripper Street, Peaky Blinders) as Superintendent Jones.

Woven through the drama will be real-life testimony from men who lived through those dark days, when homosexuals were routinely imprisoned or forced to undergo chemical aversion therapy in an attempt to cure them of their ‘condition’.

Against the Law will be broadcast on BBC2 later in the year.