A grainy monochrome photograph captures the joy and reckless courage of what it was like once to be on the front line of the struggle for gay rights. It was taken in Belfast in the early 1980s and features a young campaigner unleashing a howl of pure defiance. His T-shirt bears the legend: “SAVE SODOMY, F**K ULSTER”. Malcolm Clark, then the 18-year-old president of the Glasgow University Gay Society, is by his side, beaming with pride at this storming of what was then a citadel of homophobia.

Mr Clark is now one of the UK’s top independent television producers, specialising in scientific documentaries. He’s also a key figure in the LGB Alliance who this week fought off an attempt by the Mermaids organisation, which lobbies for trans rights, to have their charitable status rescinded.

The inferno of his youthful fights against injustice may have eased to a simmer, but the passion remains undimmed. His recollections of that day in Belfast are vivid. “The National Union of Students had organised its first-ever gay rights conference in Northern Ireland where homosexuality was still a criminal offence. As president of my university’s Gay Society I’d been invited to talk about the Glasgow experience.

“The late Reverend Dr Ian Paisley was leading a massive protest outside our venue with placards bearing the legend ‘Save Ulster from Sodomy’. I popped out to take a look and was snapped for a photograph that later appeared on the calendar of a republican newspaper. I don’t think Sinn Fein had an official position then on gay rights, but someone on their editorial team obviously considered us sound if we were upsetting Ian Paisley.”

Mr Clark was 17 when he arrived at Glasgow University and hadn’t initially intended to get involved in gay activism. “I’d been a sensitive and feminine boy from Dalry in North Ayrshire. And growing up in Dalry, a lad didn’t stay sensitive and feminine for very long.

“My entry into the world of gay activism was a complete accident. I remember being drawn to the Gay Society stall at Freshers Week and being invited for a drink afterwards. I was a bit nervous as I wasn’t exactly ‘out and proud’.

“The next thing, they’re talking about needing a president, and they’re all looking at me. Most of the others were too busy being active with the likes of the International Marxist group or the Revolutionary Communist Group and so my career as an activist had begun.”

When he’d started university, gay sex was still a crime and casual homophobia was almost universal. He remembers being beaten up a couple of times when he and his boyfriend attempted to gain entry to the conservative Glasgow University Union, then a jerky fiefdom of chinless ya-yas drawn largely from the private school sector.

“Most of the Gay Society’s meetings were held in the more progressive Queen Margaret Union but I proposed holding a meeting at the GUU. I went to the Porter’s Box to book a meeting-room. The porter duly phoned his committee bosses to tell them that the GaySoc wanted a room.

“After a very short conversation between them, he turned to me and said: ‘they’ve told me to tell you to f**k off’. When we later wrote formally to them requesting a meeting space they replied that this was out of the question as we ‘would corrupt young people’.

“Eventually though, they had to relent. All the other colleges and universities with whom they had reciprocal privileges immediately withdrew them. They had become pariahs. But the encounter had served a very positive purpose. I ran for the presidency of the Union and came very close to it.

“Some of the board members helped protect me from physical assault and then asked me to take them down to Bennet’s (Glasgow’s best-known gay bar). Simply by standing our ground and arguing our case reasonably we had begun to change hearts and minds.”

While Mr Clark was putting life and limb on the line for gay rights, others chose to conceal their sexuality until much later when the battles had been won and it was considerably safer to do so. He was at university along with several people who became luminaries in politics and the media, including John Nicolson MP, whom he considered a close friend. “We knew each other’s families. He was a good lad and it’s a shame that our friendship has ended over the current trans debate.”

In the 1970s and 1980s, among all the edgy and progressive movements seeking social justice and equality there were none more radical than the gay rights movement, where activists faced physical violence, job discrimination and prison. Yet Mr Clark refuses to be bitter that years after they thought the big battles had been won, they are now having to face down a more virulent and regressive threat to their hard-won rights.

“I try to look on the bright side,” he says. “But yes it’s depressing that a lot of our good work is being trashed. I get most angry about the carelessness towards issues surrounding child safeguarding in schools. It’s so irresponsible.

“We spent 60 years convincing the public that gay people didn’t have designs on vulnerable children and now it’s almost a badge of honour among some LGBT groups to be careless about risks or actively to promote gender identity.

“There’s currently a lazy assumption that if you don’t conform to the rigid stereotypes of sex that you must be a different sex. This is so dangerous for children and teenagers, especially the promotion of puberty-blockers.

“I’ve produced a lot of science documentaries where we’ve focused on medical scandals. The promotion of puberty-blockers, in my opinion, is right up there with the worst of them. They get allowed with no robust trialling ever being done and despite much evidence that they’re damaging. Yet this has become a major campaigning issue for Stonewall.”

He points to the unlikely alliances that emerged at the height of the authentic gay rights struggles, such as the bonds that formed between Pride campaigners and British miners during the 1984-85 miners’ strike. This still stands as a rebuke to some middle-class, salon liberals who insist on gas-lighting working-class people for not being sufficiently supportive of their boutique concerns.

“Organisations which form around the rights of sexual minorities must be careful about exaggerating problems and dealing in mistruths. One of the reasons we felt we needed to establish LGB Alliance was because we believe that the way LGBTQ lobby behaves is almost designed to inspire a backlash due to decent, hard-working people becoming angry at being accused of bigotry when they absolutely are not. There needed to be an organisation that stood up and declared ‘Not in Our Name’.”

His reputation as a gifted documentary-maker hasn’t been enough to save him from discrimination for holding views that are protected in international and UK law and for belonging to an organisation recognised by the Charities Commission. He’s been nominated for an Emmy and made documentaries with the late Professor Stephen Hawking and the actor William Shatner. Lately though, he’s found himself marginalised by people whom he still considers to be valued friends.

“Some of them own successful production companies who tell me that they want to work with me. But that even discussing the gender issue at work means having to go into a sound-proofed room with another senior executive, so that none of their younger staff can actually hear it. So, much of my work now is with European companies, especially French. It’s just something I have to accept.”

How important does he think is Thursday’s court victory recognising the right of LGB Alliance to be recognised as a charity? “It’s very important,” he said, “My only regret is that we had to spend so much money fighting this that could have been better spent advocating for gay, lesbian and bisexual rights in the 90-odd countries where they’re still suppressed.

“The court’s judgment reinforces the notion of plurality in debate. It’s the latest of several judgments that really underline this. A functioning democracy rests on robust debate where only by having as many people as possible discuss and challenge arguments will you have a chance of making good laws. This judgment confirmed that public figures don’t have a right not to be criticised and that charities have a right to make fierce defences of their positions.”