It took eight long years, but the verdict gay rights activists in India had long been hoping for was finally delivered by the Delhi High Court this morning. Consensual gay sex between adults is no longer criminal. In their 105-page decision, the judges ruled that Section 377, which criminalises gay sex, denies a person his or her right to dignity, thereby violating the Indian constitution.

Needless to say, gay rights activists across the country are celebrating, and rightly so. The 149-year old colonial law, though rarely used to secure convictions, has been used by the police to detain, harass, blackmail, and rape sexual minorities for several years. Indeed, only five years ago, Lucknow police used the said legislation to arrest several members of the Naz foundation, accusing them of running a “gay sex racket”. What’s more, the law has been a significant deterrent in India’s fight against HIV/AIDS.

The verdict was not wholly unexpected. Last year, when the court heard arguments for and against the section, it censured the erstwhile government for taking a casual attitude to the whole case. It also refused to endorse meaningless statements that invoked nebulous notions of morality and Indian culture, and made helpful comparisons between caste-based discrimination and discrimination against sexual minorities.

Just a few days ago, on the 40th anniversary of Stonewall riots, as gay men and women marched in their hundreds across the metropolitan cities like Delhi, Bangalore and Chennai, the government hinted it was considering scrapping Section 377. That said, it did backtrack when the story made headlines across national newspapers, triggering opposition from religious groups. Despite this, a mood of cautious optimism had set in.

Now, the hope is that this ruling will pave the way for wider acceptance of sexual plurality, and eventually to full legal equality for all sexual minorities.

The gravity of the verdict notwithstanding, it is important to understand that, as yet, nothing is certain. As soon as the verdict came out, all the major religious groups in India expressed their dismay. The ruling Congress party was mute. The opposition Hindu nationalist Bharatiya Janata Party said it was firmly opposed to the judgement. It is possible that the government, to pander to these groups, might appeal the verdict at the Supreme Court. Even if the government doesn’t, the religious groups have indicated that they might challenge the court decision.

Given that the same Delhi High Court rejected the petition twice, it is not beyond the realms of possibility, though unlikely, that the Supreme Court might reverse today’s ruling.

Another important source of concern is how regional governments, and even other ministries of the national government might react. While the landmark ruling made national headlines, it barely got a mention in regional media. There is a big divide between rural and urban India, and it is by no means an exaggeration to say that the Indian public opinion is overwhelmingly against homosexuality. To court popular support, it is possible that some blatantly anti-gay laws might be enacted. Same-sex marriage and adoption might well be proscribed.

Such possibilities notwithstanding, the High Court judgement is a step in the right direction. But, it is just the first step. The real task lies ahead in changing public attitudes to homosexuality. That, unfortunately, will take some time.