MALCOLM HULKE was a successful writer for radio, television and the cinema from the 1950s to the late 1970s.

His work included episodes for Armchair Theatre and The Avengers, and no less than 54 episodes for Doctor Who, broadcast between 1967 and 1974.

He was also a member of the Young Communist League (YCL) and later the Communist Party of Great Britain (CPGB) certainly from 1945 until the mid-1960s and perhaps even up to his death.

One of his earliest political campaigns was squatting in 1946 with other communists to make posh London hotels available to people left homeless by wartime bombing.

He was a lifelong socialist and his left-wing political views were what made his writing so relevant and enjoyable. He constantly explored anti-authoritarian, environmentalist and humanist themes in all his works.

Hulke was universally known as “Mac” to comrades, colleagues and friends. His political history, including his Communist Party membership, was not well known until our good friends at MI5 released at least some of the information they had collected about him.

They gained that information by steaming open his mail, bugging his phone and the phones of places he worked, or organisations he belonged to.

In the files are reports from agents, spies and police who had watched him and talked to him throughout his life.

MI5 first got to know about Mac when he applied for naturalisation papers. Although he had been born in Britain of British parents, he was illegitimate and, amazingly in those days, that made him an alien.

Mac’s huge MI5 file opens with a 1947 letter to the Communist Party headquarters in King Street Covent Garden asking for a job. He got a position as a shorthand typist.

He was constantly battling with the Home Office to get his naturalisation papers in order and within a few days of starting work at Communist Party headquarters he phoned Scotland Yard from work.

This far from smart, perhaps just naive, move saw him losing his job.

The bulging and heavily redacted MI5 files, not released until October 2014, record much detail about his long party membership.

They cover disputes with people at party headquarters, a brief resignation and rejoining in 1951 and much more beside.

They also cover his writing for the Daily Worker (predecessor of today’s Morning Star) the Guardian and other publications.

These MI5 files only take us up to 1963. Mac’s files after that date and up to his death 40 years ago are still firmly locked up in the MI5 vaults. Release date unknown.

The MI5’s files’ final pronouncement declare Mac to be “a dangerous man, and without scruples, so far as his Communistic outlook is concerned.”

Hulke was born in 1924 and never knew his father. He lived with his mother, Marian, who ran a boarding house in the Lake District with a female partner Winifred Boot. Marian died in 1943.

When war came, Mac attempted to register as a conscientious objector but he was conscripted into the Royal Navy. In Norway he met Soviet prisoners of war and was impressed by the Red Army’s defeat of the nazis on the eastern front.

From the 1950s Mac was involved with Unity Theatre, serving as its production manager in 1951. Strangely for somebody who would write many TV screenplays later he never wrote any plays at Unity.

He was author of Unity Theatre’s 25th anniversary booklet Here be Drama.

In 1962 Mac became treasurer of the Unity Theatre Trust.

Mac met writer Eric Paice at Unity and the two started writing for television, beginning in the late-1950s with This Day in Fear for BBC’s Television Playwright series.

The pair then wrote four plays for ABC’s Armchair Theatre. As well as TV the two wrote a couple of B-movies for the big screen.

Still writing as a pair, 1960 saw a commission for a children’s science fiction serial for ABC — Target Luna.

It would be so successful it would lead to three more series: Pathfinders in Space, Pathfinders to Mars, Pathfinders to Venus.

Mac wrote nine episodes of the Avengers, four with a new partner Terrance Dicks. Dicks had rented a room in Mac’s house.

Next, in 1964, came a commission for six episodes of a new science fiction series to be called Doctor Who. It would change Mac’s life and television generally forever.

Although he still wrote for all sorts of other programmes and series such as Crossroads, United!, Gideons Way, even Gert and Daisy and many others, it was his Doctor Who episodes that would make his reputation.

His Doctor Who scripts avoided simplistic story lines or black-and-white characterisation. Military figures are usually presented unfavourably such as in the Invasion of the Dinosaurs and Ambassadors of Death.

Both have high-ranking military leaders as the ultimate villains.

Mac lived for many years in Notting Hill Gate and locations nearby. The Notting Hill Progressive and Cultural Club was an arts venue run by local communists including Mac, but was not officially part of the CPGB. Briefly Mac lived at the club.

Later Mac’s life stabilised when he took a room at the Parliament Hill Fields house of Betty Tate, a widow and fellow CPGB member who had three daughters.

Betty had read history at Oxford in the early 1930s and joined the party. She married George Tate, who was a historian and journalist at the Daily Worker.

George died in 1956 and Betty started taking in lodgers, one of whom was Mac. He helped out with her political activities, writing pamphlets for the Socialist Sunday School, selling the Daily Worker, and running fundraising bazaars.

When his mother’s partner Winifred Boot sold her Lakeland guest house and moved to London, she and Mac bought a house round the corner from Betty Tate. They also let rooms, one to writer Terrance Dicks.

Winifred wrote to one of Mac’s brothers in December 1963: “Mac is well but very busy. He is writing a six-part serial for television to be produced in early 1964, and has just completed a one-hour episode for The Avengers series.

“Somehow he makes time to see me every day and last week took me to St Martin’s Theatre to see The Sound of Music. It was a lovely evening there back in his lovely car, with the heater on. I wish your mother had lived to see his success.”

Mac himself said of Doctor Who: “It’s a very political show. Remember what politics refers to, it refers to relationships between groups of people. It doesn’t necessarily mean left or right … so all Doctor Who’s are political, even though the other group of people are reptiles, they’re still a group of people.”

Hulke died on July 6 1979. Dicks recalls that, as a convinced atheist, he had left orders that there was to be no priest, no hymns or any other ceremony at his funeral and that therefore his friends sat by the coffin not knowing what to do.

“Finally Eric Paice stood up, slapped the coffin and said: ‘Well, cheerio, Mac’ and wandered out. We all followed him.”

He may be gone but Mac’s work, and his ideas live on, and the admiration of millions of Doctor Who fans worldwide are testament to Hulke’s political beliefs that always inspired his writing.