Codification of criminalization of homosexual activity was enacted by of Section 377 by the British, which stood for more than 70 years after Indian independence.
In the UK, Section 377 was enacted to criminalize homosexual relations, remaining in force for over 70 years following India's independence from colonial rule.