India's home ministry has disowned an apparent call from a government lawyer for a landmark ruling decriminalising gay sex to be overturned.
Additional Solicitor General PP Malhotra had told the Supreme Court that homosexuality was immoral.
But it turned out he had been reading an old statement delivered before the 2009 judgment. The home ministry said there had been a "miscommunication".
The Supreme Court is hearing challenges from groups opposing the new law.
The Delhi High Court ruling in 2009 overturned a 148-year-old colonial law which described a same-sex relationship as an "unnatural offence".
The ruling was welcomed by India's gay community, which said the judgement would help protect them from harassment and persecution.
But political, social and religious groups want the colonial-era law reinstated.
Eyebrows were raised when Mr Malhotra appeared to take their side, telling the Supreme Court: "Gay sex is highly immoral and against social order and there is high chance of spreading of diseases through such acts."
He said that India could not imitate Western practices.
"Our constitution is different and our moral and social values are also different from other countries, so we cannot follow them," Mr Malhotra said, adding that society's disapproval of gay sex was strong enough to criminalise it.
Within hours later, the home ministry issued a statement denying it had called for a new ban on homosexuality.
It said it "has not taken any position on homosexuality".
"After the judgement of the Delhi High Court decriminalising homosexuality was delivered, the matter was considered by the cabinet. The cabinet decided that the government may not appeal against the judgement to the Supreme Court," the statement said.
Officials later said Mr Malhotra had read out from the report the government submitted in the high court before the 2009 ruling.
'What is unnatural sex?'
Many people in India still regard same-sex relationships as illegitimate, but rights groups have long argued that the law contravened human rights.
Section 377 of the colonial Indian Penal Code defined homosexual acts as "carnal intercourse against the order of nature" and made them illegal.
But the Delhi High Court said the colonial-era law was discriminatory and gay sex between consenting adults should not be treated as a crime. Until the high court ruling, homosexual acts were punishable by a 10-year prison term.
Last week, the Supreme Court began a debate on the legality of decriminalising gay sex in private between consenting adults.
The court asked groups challenging the judgement to define "unnatural sex".
"So who is the expert to say what is 'unnatural sex'? The meaning of the word has never been constant," Justices GS Singhvi and SJ Mukhopadhyaya asked a petitioner who challenged the judgement.
"We have travelled a distance of 60 years. Now it is test-tube babies, surrogate mothers. They are called discoveries. Is it in the order of nature? Is there carnal intercourse?" the judges asked.