After months of deliberations, the Supreme Court on Thursday struck down the Section 377 of the Indian Penal Code, which criminalised homosexuality.
The following is the chronology of events leading to the apex court unanimously decriminalising part of controversial Section 377.
2001: Naaz Foundation, an NGO fighting for gay rights, files PIL in Delhi high court seeking legalisation of gay sex among consenting adults.
September 2004: HC dismisses the PIL; gay right activists file review petition.
November 3: HC dismisses review petition.
December: Gay rights activists approach the Suprme Court against the HC order.
April 3, 2006: The SC remands the case back to the HC, directs it to reconsider the matter on merit.
October 4: HC allows senior Bharatiya Janata Party leader B P Singhal's plea, opposing decriminalising gay sex, to be impleaded in the case.
September 18, 2008: Centre seeks more time to take stand on the issue after contradictory stand between Home and Health ministries over decriminalisation of homosexuality. HC refuses the plea and final arguments in the case begin.
September 25: Gay rights' activists contend that the government cannot infringe upon their fundamental right to equality by decriminalising homosexual acts on the ground of morality.
September 26: The Centre says gay sex is immoral and a reflection of a perverse mind and its decriminalisation would lead to moral degradation of society.
October 15: HC pulls up the Centre for relying on religious texts to justify ban on gay sex and asks it to come up with scientific reports to justify it.
November: Govt in its written submission before HC says judiciary should refrain from interfering in the issue as it is basically for Parliament to decide.
November 7, 2008: HC reserves verdict on pleas filed by gay rights activists seeking decriminalisation of homosexual acts.
July 2, 2009: HC allows plea of gay rights activists and legalises sexual activity among consenting adults of same sex.
July 9: Delhi astrologer challenges HC verdict in SC. Several other pleas challenging the judgment also filed.
February 15, 2012: SC begins final day-to-day hearing in the case.
December 11, 2013: SC sets aside 2009 Delhi HC order which had decriminalised gay sex.
December 20: Centre files review petition in SC seeking re-examination of its verdict.
January 28, 2014: SC refuses to review its verdict on criminalising gay sex, dismisses pleas of Centre, activists.
April 3: SC agrees to consider an open court hearing on curative petitions filed by gay rights activists against its verdict criminalising homosexuality.
February 2, 2016: SC refers curative pleas on homosexuality to five-judge bench.
June 29, 2016: SC refers the plea of celebrities like dancer N S Jauhar, chef Ritu Dalmia and hotelier Aman Nath, for quashing of section 377 of the IPC, to a bench already seized of the matter.
August 24, 2017: SC declares right to privacy a fundamental right under the Constitution, also observes that "sexual orientation is an essential attribute of privacy".
January 8, 2018: SC agrees to reconsider its 2013 decision and refers to a larger bench the plea challenging 377 of the IPC. Later, 20 former and current students of the IITs join the fight against section 377 of IPC.
July 9: SC refuses to adjourn proposed hearing by a five-judge Constitution bench on a batch of petitions challenging its verdict that had re-criminalised consensual carnal sex between two adults.
July 10: Five-judge constitution bench commences hearing on batch of pleas.
July 11: Centre leaves it to the wisdom of SC to decide the validity of Section 377.
July 12: SC rejects demand for a referendum over constitutional validity of Section 377 saying it would not go by majority opinion.
July 17: SC reserves verdict saying that the courts cannot wait for a majoritarian government to decide on enacting, amending or striking down a law if it violates fundamental rights.
September 6: Constitution bench unanimously decriminalises part of Section 377 of the IPC which criminalises consensual unnatural sex, saying it violated the right to equality.
FAQ: What is Section 377?
'We are finally azaad in azaad Hind'
'India was never, ever homophobic'
Asexual and proud of it
'Homophobia in Bollywood will now have to end'