In 2018, the Supreme Court of India said that homosexuality was not a crime. It declared that Section 377 of the Indian Penal Code did not follow the constitution when adults had consensual homosexual sex. Homosexuality was never illegal in ancient Indian and traditional codes. It was made a crime by the British during their rule in India.