India’s top court has refused to legalise same-sex marriages, with the chief justice of the country saying that it is up to Parliament to create such a law.

Chief Justice DY Chandrachud also urged the government to uphold the rights of the LGBT+ community and end discrimination against them.

The five-judge bench earlier this year heard 20 petitions that sought to legalise same-sex marriage in the world’s most populous country.

Chief Justice Chandrachud said there were degrees of agreement and disagreement among the justices “on how far we have to go” on same-sex marriages.

India Same Sex MarriagePeople hold hands as they wait for the Supreme Court verdict (Manish Swarup/AP)

“This court can’t make law. It can only interpret it and give effect to it,” the chief justice said, reiterating that it was up to Parliament to decide whether it could expand marriage laws to include same-sex unions.

Legal rights for LGBT+ people in India have been expanding over the past decade, and most of these changes have come through the Supreme Court’s intervention.

Tuesday’s judgment comes after the top court in 2018 struck down a colonial-era law that had made gay sex punishable by up to 10 years in prison and expanded constitutional rights for the gay community.

The decision was seen as a historic victory for LGBT+ rights, with one judge saying it would “pave the way for a better future”.