Watching Victim in 1961, audiences would have been shocked to hear the word “homosexual” – the first time it had been uttered in a movie. What shocks when watching Victim today is hearing the words “convicted homosexual”. Homosexuality would remain a crime until the 1967 Sexual Offences Act was passed 50 years ago this month; something this crusading film played its part in bringing about.

Victim fashions a tight social thriller out of an issue that was under heated debate at the time, but it also conveys the gay man’s plight in a bygone era. “I’ve been to prison four times. I couldn’t go through that again,” a barber tells Dirk Bogarde, explaining why he’d rather pay his blackmailers than go to the police. Bogarde’s character also has much to lose, as a lawyer with prospects: wealth and an adoring wife (Sylvia Syms). Having been photographed in a compromising embrace with a young man, he risks his reputation to track down the blackmailers.

Watch the trailer for Victim.

Bogarde had much to lose in real life as well. Before Victim, he was “the idol of the Odeons”, the biggest movie star in the land. But he willingly relinquished that status for Victim. Even more jolting than hearing the word “homosexual”, must have been hearing Bogarde confess to Syms, “I wanted him!” – a jolt of erotic passion even heterosexual movies of the era would avoid. As an actor who would remain closeted for his entire career, his anguish was doubtless heartfelt. In retrospect, Victim looks like a progressive alliance of British cinema talent. Just before Victim, Syms played the fiancee of a Jamaican immigrant in Flame in the Streets; two years later, she was one half of Britain’s first on-screen lesbian couple in The World Ten Times Over. Director-producer team Basil Dearden and Michael Relph, meanwhile, had tackled postwar problems including anti-German bigotry (1947’s Frieda) and racial tensions (1951’s Pool of London and 1959’s Sapphire).

Attitudes didn’t change overnight after Victim. And you could argue there’s still a way to go when a national newspaper can cast aspersions on a judge for being “openly gay”, or a member of the UK’s governing coalition (the DUP’s Iris Robinson) likens gay sex to child abuse. Bogarde never publicly acknowledged his sexuality but Victim opened a distinguished second act to his career that included sexually complex classics such as The Servant, Death in Venice and The Night Porter. Victim was “the wisest decision I ever made in my cinematic life,” Bogarde later said. “It is extraordinary … to believe that this modest film could ever have been considered courageous, daring or dangerous to make. It was, in its time, all three.”

Victim is in cinemas from 21 July