A lawyer for India's Home Ministry told the country's top court that gay sex was "immoral" and urged the court to keep it illegal, even as the government denied it opposed decriminalizing homosexuality. (Rajanish Kakade/AP)

It was a day of flip-flops for the Indian government over its attitude toward homosexuality.

First, the government’s top lawyer told the Supreme Court that gay sex is immoral, enraging activists. The government quickly retracted his statements. But the court said it was too late to withdraw the arguments.

As the court heard an appeal against a 2009 Delhi High Court order legalizing homosexuality, P.P. Malhotra, India’s additional solicitor general, said that India should not blindly follow other countries in decriminalizing gay sex and that the law of the land could not run counter to Indian social values.

“Our constitution is different and our moral and social values are also different from other countries, so we cannot follow them,” he said, according to the Press Trust of India. “Gay sex is highly immoral and against social order and there is high chance of spreading of diseases through such acts.”

His argument created a furor among India’s nascent gay rights movement.

But soon after Malhotra spoke, India’s ministry of home affairs issued a brief statement saying his comments did not reflect the ministry’s position. The government noted that it had decided not to join the appeal against the 2009 judgment, and that Malhotra was merely helping the Supreme Court “examine the matter and to decide legal questions involved.”

Another of the government’s lawyers then told the court that the home ministry had instructed him to convey that it was taking no position on the issue. But the judges said the government could not withdraw arguments it had already advanced.

The government’s backtracking frustrated gay rights activists, especially because Malhotra’s comments came just a day after a government-backed commission on children’s rights told the court that legalizing homosexuality would promote child abuse.

“We said that children are more susceptible to exploitation because a large number of child abuse cases are of homosexual nature,” said Amrendra Saran, the lawyer representing the Delhi Commission for Protection of Child Rights. “Children will grow up seeing this kind of behavior in the open. These people will also try to convert children to their way of thinking. This affects [the] institution of marriage, family. The judgement in 2009 was a mistake, it sets a dangerous precedent.”

Taken together, the statements shocked activists who won a historic judgement just three years ago when the Delhi High Court overruled a colonial-era ban on gay sex. Since then tens of thousands of Indian gays have attended colorful annual parades on the streets of the Indian capital.

The gay community said the 2009 ruling decriminalizing homosexuality in India’s capital had helped them fight routine police harassment, including the demanding of bribes and threats of arrest.

But several political, religious and social groups — including the children’s rights commission — opposed the decision and filed appeals in the Supreme Court arguing against the removal of gay sex from the “unnatural offenses” list of the Indian penal code, which made it punishable with 10 years in prison.

The Supreme Court must decide whether to overturn the 2009 judgment and has set Feb. 28 for its next hearing.

A leading gay rights activist, speaking on the condition of anonymity because the matter is pending in court, said Malhotra’s statement sent confusing signals to the movement and indicated that the government was not fully backing their fight.

“Whose views is the attorney general reflecting if not the government’s?” she said.

Later, Malhotra continued to insist he was representing the home ministry at the hearing.

Even though ancient Hindu temples sculptures portray homosexual couples and there are many transgender and homosexual characters in Hindu epics, Indians by and large regard homosexuality as a Western import and many believe it should remain illegal.

Although attitudes are slowly changing in India’s big cities, gays and lesbians are still lampooned in cinema. There have been a few television chat shows hosted by gays and transsexuals in recent years, and some members of India’s transgender community have also run for local city elections and won.

But the bias still runs deep.

In July last year, India’s health minister Ghulam Nabi Azad called homosexuality “unnatural” and a “disease” at a lawmakers meeting on HIV. But after a volley of opposition, Azad said later that he had been misquoted.