Gay people have always existed—but they haven’t always been able to express their love without condemnation and even criminal penalties. Take England, where a thriving gay underground existed for years before the country’s restrictive anti-gay laws were repealed. Too often, the lives and loves of LGBTQ people have been forced into the shadows. But now, a new exhibition at the British Library brings those struggles into the open.

It’s called Gay UK: Love, Law and Liberty, and it runs in the entrance hall gallery through September 19. The exhibition coincides with the 50th anniversary of the Sexual Offences Act, a 1967 law that decriminalized homosexual behavior.

Visitors to Gay UK can check out notes and pictures from the production of My Beautiful Laundrette, a 1985 film that became an instant classic as one of the few available movies of its day that depicted a positive gay relationship. They can peruse works by Oscar Wilde, who served jail time in one of Britain’s most publicized cases regarding homosexuality. And they can look at the restrictive laws that turned love into a criminal act for tens of thousands.

Those laws were in place for centuries, starting in the 16th century with the Buggery Act, which called homosexual activity “abominable.” Over the years, anti-gay laws evolved. So did punishments: While some men served time in jail or paid hefty fines for their sexual acts, others submitted to aversion therapies and even forced castration. One of the most well-known victims was Alan Turing, the famous codebreaker and computer scientist, who was given estrogen injections after being convicted of “gross indecency” under British law.

The United Kingdom has since repealed its anti-gay laws. Earlier this year, a law pardoning men who were convicted of sexual offenses under those laws went into effect after a few false starts. Nicknamed the Alan Turing Law, the policy clears people who were convicted of homosexual behavior from criminal records and offers posthumous pardons to those who died before they could be cleared.

The exhibition is a chance to consider “how gay men and women have been represented and how they have sought to describe and define themselves,” says the library in a press release. Though the number of people who disapprove of same-sex relationships in Britain is dwindling, homophobic attacks still take place in the country. There’s still further go to in terms of LGBTQ rights in Britain and around the world—but the exhibition offers a glimpse of just how far those rights have come.