India’s top court on Thursday overruled a previous decision, striking down a 157-year-old law that criminalized gay sex.

A five-judge bench of the Supreme Court of India unanimously ruled that Section 377 of the Indian Penal Code, which punished gay sex with a 10-year-to-life sentence, was unconstitutional. The decision, which emphasized inclusion and diversity in society, was a landmark win for LGBT rights in India, which has the world’s second-largest population.