The Oscar Wilde Trials
In 1891, despite being married and having two kids, Oscar Wilde started an ongoing affair with Lord Alfred Douglas. There were 16 years between the two of them. The Marquess of Queensberry, Douglas' father, wanted to rat the two of them out and punish Wilde for his actions towards his son (despite the consent that is implied between the two people in an affair that lasts several years, but that's neither here nor there). Wilde was urged by friends to flee to France, where homosexuality was no longer criminalized thanks to the French Revolution, but Wilde stood his ground too aggressively, biting back at the Marquess and suing him for defamation. The two went to court in a libel case.
The initial libel case against the Marquess occurred on April 3rd, 1895, and it went awfully for Wilde, since the claims of Wilde being a homosexual were true, and that is the exact opposite of what libel is. The Marquess' defense cross-examined Wilde about the plot and themes of The Picture of Dorian Gray as well---he was trying to imply that those themes of beauty in men and the envy of the beauty of other men were themes that Wilde used to try seducing Lord Alfred. Three days after the initial court proceedings, Wilde's lawyer withdrew the lawsuit, because how can you outrun the truth in a libel case? It's impossible. But unfortunately, British authorities saw the lawsuit withdrawal as a sign that Wilde was in fact guilty, and they issued a warrant on indecency charges for Wilde's arrest.
Even though friends of Wilde's continued to urge him to flee to France, Wilde stayed put in Britain and stood trial once again, this time being tried for homosexuality on April 26th, 1895. After pleading not guilty on 25 counts of gross indecency, and after witnesses (hotel chambermaids and housekeepers) testified saying that they had seen young men in Wilde's bed, Wilde was even questioned about one of Lord Alfred Douglas' poems, "Two Loves," especially the line "the love that dare not speak its name" (a clear indicator of homosexuality). When the jury could not reach a verdict, Wilde was retried three weeks later, and then convicted of gross indecency. His prison sentence was two years of hard labor, which was the maximum sentence allowed for gross indecency charges.
During Wilde's prison stay, Wilde's health suffered and did not stop declining after his prison release. Wilde spent the last three years of his life in France. He died on November 30th, 1900, at only 46 years old. He was then buried in Paris.
Source: https://www.history.com/topics/gay-rights/oscar-wilde-trial