The Indian government is considering decriminalising homosexuality, a day after the country's top court upheld a law which criminalised gay sex.
Law Minister Kapil Sibal said "all options were being considered to restore a 2009 Delhi High Court order" which had decriminalised gay sex.
Earlier, Finance Minister P Chidambaram said the ruling had taken India "back to 1860".
There has been outrage over the ruling seen as a huge blow to gay rights.
Gay rights activists called it "retrograde" and "disappointing" and said they would approach the court to review its decision.
The United Nations too criticised the decision, calling it a "significant step backwards for India".
"Criminalising private, consensual same-sex sexual conduct violates the rights to privacy and to non-discrimination enshrined in the International Covenant on Civil and Political Rights, which India has ratified," UN human rights chief Navi Pillay said in a statement issued in Geneva on Thursday.
The statement added that the ruling was "a blow for human rights".
According to Section 377, a 153-year-old colonial-era law, a same-sex relationship is an "unnatural offence" and punishable by a 10-year jail term.
In its 2009 ruling, the Delhi High Court had described Section 377 as discriminatory and said gay sex between consenting adults should not be treated as a crime.
The ruling was widely and visibly welcomed by India's gay community, which said the judgement would help protect them from harassment and persecution.
Several political, social and religious groups had petitioned the Supreme Court to have the law reinstated in the wake of the 2009 court ruling.
While reversing the landmark Delhi High Court order, the Supreme Court said it was up to parliament to legislate on the issue.
"The government is considering all options to restore the High Court verdict on [Section] 377. We must decriminalise adult consensual relationships," Mr Sibal wrote on Twitter.
Earlier, Mr Chidambaram told the NDTV news channel that he was "extremely disappointed" with the court ruling.
"We have gone back to 1860. The government will look at all options. The legislative option takes time but I am not ruling it out," Mr Chidambaram said.
"The reasoning of the judgement is worrying. Our knowledge of physiology and psychology was poor in 1860, now to say same sex intercourse is against order of nature is retrograde," he added.
The president of the ruling Congress party Sonia Gandhi also criticised the Supreme Court ruling.
She said she was disappointed over the order and hoped that the parliament would address it, reported Press Trust of India.
"Delhi High Court had wisely removed an archaic, unjust law," she added.
Wednesday's Supreme Court ruling was welcomed by religious groups, particularly leaders of India's Muslim and Christian communities, who had challenged the Delhi High Court order.
Correspondents say although the law has rarely - if ever - been used to prosecute anyone for consensual sex, it has often been used by the police to harass homosexuals.
Also, in deeply conservative India, homosexuality is a taboo and many people still regard same-sex relationships as illegitimate.