The Mattachine Society was one of the earliest US gay rights groups, formed in 1950 to address the overwhelming discrimination gay men and other queer people faced. The criminalization of gay sex in the mid-20th century is well known, and federal anti-sodomy laws weren't off the books until 2003.
Slate recently unearthed a document in the Mattachine archives from 1964 that shows a list of sex crimes - sodomy, fornication, adultery and cohabitation - and their corresponding mandatory sentences. Sodomy had by far the harshest penalties, with mandatory minimums of 20 years in prison in Florida, Massachusetts, Minnesota and Nebraska. North Carolina even allowed up to 60 years in prison for sodomy, which, at the time, had a very broad definition.