Activists had been fighting the ban since the 1990s, suffering several court reverses before Thursday's verdict which sparked celebrations among lesbian, gay, bisexual and transgender groups (LGBT) across India.
Section 377, an archaic law imposed during British rule that penalizes intercourse "against the order of nature", carries a maximum sentence of life imprisonment.
Akhilesh Godi, one of the petitioners in the case had said prior to the announcement that, "It is not only about decriminalising but recognising our fundamental rights".
In 2009 the Delhi High Court effectively decriminalised homosexuality, saying a ban violated fundamental rights, but the Supreme Court reinstated it in 2013 after religious groups successfully appealed, saying that the high court had overstepped its authority and that the responsibility for changing the law rested with lawmakers not the courts. It has also asked that the police force should be given be given periodic training to sensitise them about gay rights.
India's government, a broadly right-wing, Hindu nationalist coalition led by the Bharatiya Janata Party, has indicated it will support the Supreme Court in its ruling, but will oppose any attempts by activists to push for further rights.
"It is well for a judge to remind himself or herself of the fact that flattery is often the graveyard of the gullible", he quoted from his judgment.
Section 377 has always been the reason to cause a stir in the society.
Justice Chandrachud said that denying rights to sexual orientation is denial of right to privacy.
He further said that the issue is how do you deal with sexual orientation with expression of sex in Article 15 of the Constitution.
Maurizio Sarri told to play Ethan Ampadu for Chelsea FC
I can't be much happier. "You don't get long [in an global break] but a big thank you to the staff and players". Lawrence added: "It was a good one to play in, the fans were incredible and we put in a performance for them".
"So proud today! Decriminalizing homosexuality and abolishingsection 377 is a huge thumb up for humanity and equal rights!"
She told the court: "History owes an apology to these people persecuted by Section 377 for the social ostracism caused by the section". However, its decision was overruled in 2013 by the Supreme Court.
The Supreme Court began hearing petitions to decriminalise gay inJuly.
"Now that we are legal, we finally feel free". He went on to explain, that what matters are the essential qualities of people and not the names we call people and labels we give.
However, the ASG proceeded to voice his personal apprehension in the light of the observation made by Justice D.Y. Chandrachud that in as much as the right to choose one's sexual partner has been recognised in the Hadiya case, such right could also possibly be extended to include a partner of the same-sex.
The Centre, which had initially sought adjournment for filing its response to the petitions, had later left to the wisdom of the court the issue of legality of the penal provision with regard to the aspects of criminalising consensual unnatural sex between two consenting adults.
However, during the July hearings this year on petitions challenging Section 377, Justice Nariman said: "We don't wait for majoritarian governments to repeal laws".
The Supreme Court decision is expected to be celebrated across India throughout the day and into the night.