NEW DELHI (Reuters) - India’s top court on Tuesday began hearing arguments challenging a colonial-era law banning homosexuality, and activists said they were optimistic it would be overturned it despite opposition from some ruling lawmakers.

The Supreme Court hearing comes around five years after it reinstated a ban on gay sex - still considered taboo by many in socially conservative India - following a four-year period of decriminalization.

Lawyers for the petitioners challenging the law said the homosexuality rule - dating from 1861, when India was under British rule - represented outdated Victorian morals and stifled individual rights.

“As society changes, values change,” Mukul Rohatgi, a senior lawyer appearing for the lead petitioner, told a bench of five judges. “What was moral 160 years ago might not be moral today.”

Tushar Mehta, additional solicitor-general for the government, said he would present the state’s views on the issue in further hearings. The court will likely resume the hearing on Wednesday.

The Indian homosexuality law, commonly known as ‘Section 377’, prohibits “carnal intercourse against the order of nature with any man, woman or animal” - which is widely interpreted to refer to homosexual sex.

Gay sex is punishable by up to 10 years in jail, but enforcement is uncommon. The law is, however, used to harass and blackmail gay people, activists say.

Lawyers for the petitioners argued that sexual orientation and gender were not matters of choice and that orientation was an intrinsic part of individual identity.

The hearing comes almost a year after the Supreme Court ruled that individual privacy is a fundamental right, a verdict constitutional experts say has a bearing on the homosexuality ban.

“Judges have been talking with sensitivity about this issue. I really liked it and I’m hopeful about it,” Anurag Kalia, a petitioner in the case, said outside the courtroom.

“We really expect that when this (law) is struck down, we will get equal rights and a better way to live our life, with dignity.”

Subramanian Swamy, a lawmaker from Prime Minister Narendra Modi’s Hindu nationalist party, said homosexuality was unnatural and against Hindu nationalism, according to video news agency ANI, a Reuters affiliate.

Britain itself made gay sex legal in 1967.