Many Indians are rejoicing after the Supreme Court decriminalised homosexuality in a historic verdict.
The ruling, which ended an 18-year legal battle, was met with cheers while some campaigners broke down into tears.
Members of the LGBT community, activists and others from across the country have been sharing images of celebration and joy online.
But strong opposition to the ruling remains among religious groups, and in conservative and rural communities.
"I hadn't come out to my parents until now. But today, I guess I have," Smriti Girish, who was at the court, told the BBC's Divya Arya.
"Why should I have to hide my identity? I can't do anything about it and I am a citizen of this country. People need to understand that we have equal rights," Shagun Aggarwal said.
The two were among the hundreds of people who had gathered outside the court to hear the verdict. As the judgment was read out, many applauded and hugged their friends and family in joy.
'I am history'
Divya Arya, BBC News, Delhi
There were multiple rounds of cheers and hoorah as news of the verdict filtered out of the courtroom to the media lawns outside the Supreme Court. Some young students burst out crying - overwhelmed with relief.
One man told me that he was still not open about his sexuality to his parents but today's judgment had inspired him to come out.
"I had only come to witness this but I guess now I am part of this moment. I am history," he said.
There was a mad rush among reporters to capture the raw emotions that were spilling out. But amidst the cheers and tears of joy and victory, there were also apprehensions that this was too little.
Some told me they felt forced to celebrate because this judgement was just reclaiming what should be their fundamental right. They said their life was still a far cry from the world that the LGBT people wanted for themselves - equal and free in every respect.
Anand Grover, one of the main lawyers in the case, told reporters outside the court that the judgement "should be publicised in every nook and corner of India".
The hashtag #Section377 has been trending on Twitter as Indians from across the country celebrated the verdict on social media.
Users also posted excerpts of the judgement along with personal stories online.
'Take me as I am'.— Harman🌼 (@jumpsuithaz) September 6, 2018
A year ago, I was in denial that I could be gay. I was so terrified of even thinking that. Today I got the best news ever. Homosexuality is not a crime anymore in India. I can't stop crying. I didn't think it was possible, not anytime soon. #Section377 pic.twitter.com/WO1WA1HB16
One of the petitioners, Krishna, who only uses his first name, told BBC Telugu that he was overjoyed when he heard. "I don't know how it will change our lives yet but it helps us lead them without fear or depression."
It's too early to say what the latest ruling will translate to in the longer term. India is still a largely conservative country and it is worth noting that the movement for LGBT rights has been most spirited in India's biggest cities.
Many people in rural communities may not be aware of the ruling or realise its significance.
The Delhi Commission for Protection of Child Rights, the Apostolic Churches Alliance and two other Christian organisations have consistently opposed any move to legalise gay sex. The All India Muslim Personal Law Board, which had opposed the move to decriminalise gay sex, has now taken a neutral stand, saying it would leave the issue to the court.
The religious groups who raised objections claimed that repealing the law would have an impact on "religious freedom" in earlier petitions.
The Hindu nationalist group Rashtriya Swayam Sevak (RSS) has also said it agrees with the Supreme Court ruling. In a statement to the press, the group said it "does not consider this to be a crime", adding that the "issue needs to be taken care of at the social and psychological level".
There was no immediate response from India's ruling Bharatiya Janata Party (BJP). It had earlier told the court it would not challenge the petition to overturn the law.
But one of its members told reporters outside the court that he was disappointed with the verdict. Subramanian Swamy, known for making provocative comments, said: "It could give rise to an increase in the number of HIV cases."
The country's main opposition Congress party welcomed the ruling in a tweet.
We join the people of India & the LGBTQIA+ community in their victory over prejudice. We welcome the progressive & decisive verdict from the Supreme Court & hope this is the beginning of a more equal & inclusive society. #Section377 pic.twitter.com/Fh65vOn7h9— Congress (@INCIndia) September 6, 2018
The UN welcomed the ruling, saying it was a day of gay pride and celebration.
Section 377, as the law is known, was first struck down by the Delhi High Court in 2009. But it was reinstated by the Supreme Court in 2013, after several social and religious groups petitioned for it to be restored.
In the years since, LGBT people have appealed to the Supreme Court, claiming that the law was unconstitutional. In 2016, the court agreed to re-examine the law.