India’s Supreme Court has declined to legalise same-sex unions, dashing the hopes of millions of LGBTQ+ people seeking marriage equality.

The court instead accepted the government’s offer to set up a panel to consider granting more legal rights and benefits to same-sex couples.

Activists and same-sex couples said they were disappointed by the judgement and would continue their campaign.

The court was considering 21 petitions by same-sex couples and activists.

The five-judge bench had held extensive hearings in April and May and the deliberations were “livestreamed in public interest”.

The petitioners had argued that not being able to marry violated their constitutional rights and made them “second-class citizens”.

They had suggested that the court could just replace “man” and “woman” with “spouse” in the Special Marriage Act – which allows marriage between people from different religions, castes and countries – to include same-sex unions.

The government and religious leaders had strongly opposed the petitions. The government had insisted that only parliament could discuss the socio-legal issue of marriage and argued that allowing same-sex marriage would lead to “chaos” in society.

On Tuesday, the judges agreed with the government, saying that only parliament could make law and the judges could only interpret them.

They accepted Solicitor General Tushar Mehta’s proposal on behalf of the government to set up a committee, headed by the country’s top bureaucrat, to consider “granting queer couples” rights and privileges available to heterosexual couples.

Two of the judges, including Chief Justice DY Chandrachud, favoured civil union and granting the same “benefits that married people enjoy” to same-sex couples.

The chief justice also read out a long list of directions to the government, asking them to ensure the end of all discrimination against the “queer community” and to protect them from harassment and violence. Justice Chandrachud also said that “queer and unmarried couples” could jointly adopt a child.

But after all the judges had spoken, and the majority of three judges on the bench did not back his list, it became clear that Justice Chandrachud’s directions will remain just that – directions.

At the start of the hearings, it had seemed like India was on the cusp of making history by allowing same-sex marriages.

The five-judge constitutional bench had said they would not interfere with religious personal laws but look at amending the Special Marriage Act to include LGBTQ+ people.

But as the hearings progressed, it became clear just how complex the matter was, with the bench conceding that issues of divorce, adoption, succession, maintenance and other related issues are governed by dozens of laws – and that many of them do spill over into religious personal laws.

Tuesday’s judgement has left activists and same-sex couples “disappointed”.

“I went to the courtroom this morning with a lot of hope, but as I heard the judges read out their orders, I felt huge disappointment. My hopes were dashed,” gay rights activist Sharif Rangnekar told the BBC.

“The decision to leave it all to a government committee with no timeline for when it is to be set up or when it would provide us with rights leaves us in the hands of lots of bureaucratic uncertainty. It is very worrying.”

Pia Chanda, who’s been in a same-sex relationship for 34 years, told the BBC the “Supreme Court is playing passing the parcel”.

“This judgement is a predictable farce and will keep the discrimination in place,” she added.

The judgement has also been welcomed by many.

Adish Aggarwala, president of the Supreme Court Bar Association, told reporters that he was happy that the court had accepted the government’s argument that it did not have the power to legalise same-sex union.

“That right only rests with the Indian parliament and we are glad that the court agrees with us,” he added.

Before the verdict, Mr Aggarwala had told reporters that allowing same-sex marriages would not be a good idea as it is “not in accordance with the system prevalent in India”.

The debate was being keenly watched in a country which is home to an estimated tens of millions of LGBTQ+ people. In 2012, the Indian government put their population at 2.5 million, but calculations using global estimates suggest it’s at least 10% of the entire population – or more than 135 million.

Same-sex couples had been pinning their hopes on this key judgement – many had earlier told the BBC they would marry if the petitions went through.

Attitudes to sex and sexuality in India remain largely conservative and activists say the community continues to face stigma and discrimination.

During the hearing, Mukul Rohatgi, one of the lawyers representing the petitioners, said society sometimes needed a nudge to accept LGBTQ+ people as equals under the constitution and that the top court’s decision would drive society to accept the community.

But for India’s LGBTQ+ community that nudge did not come today.