A sensitive debate over gay sex in India was thrown into farcical confusion yesterday after a government lawyer urged the Supreme Court to ban it – only for the government to contradict him hours later in a statement accepting a recent ruling that made it legal.

Television channels reported that the lawyer may have been confused and read out the wrong statement in front of the Supreme Court, reflecting an old government opinion.

Additional Solicitor General PP Malhotra told the court that "gay sex is highly immoral and against social order and there is high chance of spreading of diseases through such acts".

The Home Ministry quickly said it was not challenging a 2009 Delhi High Court order that struck down a colonial-era law making sex between people of the same gender punishable by up to 10 years in prison. The ministry said it had "not taken any position on homosexuality".

Conservative groups have asked the top court to overturn the lower court's order, and Supreme Court judges are hearing opinions from a range of people – including conservative groups and gay rights activists.