According to a coming book by historian Robert Beachy, the genesis of the modern gay rights movement came in 19th century Germany.
Modern conceptions of homosexuality began, ironically, with an anti-sodomy law. When the German empire was unified in 1871, the Imperial Criminal Code included a law prohibiting sexual penetration of one man by another. Questions about what types of activity should fall under the law spurred a sustained public inquiry into the nature of same-sex eroticism and sexuality in general. [snip] This new view of same-sex love was pioneered by German doctors who published early case studies of homosexuals in the 1850s. German psychiatrist Richard von Krafft-Ebing released the first edition of his hugely influential Psychopathia Sexualis in 1886, which included multiple case studies of homosexuals that supported this new position. Through his work, Krafft-Ebing became a vocal opponent of the German anti-sodomy law, stating that homosexuality "should not be viewed as a psychic depravity or even sickness."Beachy claims the world's first gay rights group, the Wissenschaftlich-humanitäres Komitee (Scientific-Humanitarian Committee) came into being at that time to gather petition signatures to repeal the anti-sodomy law. His book, The German Invention Of Homosexuality, is due out next year.