Updated

In a landmark ruling, India’s top court has struck down a colonial-era law that prohibits homosexual acts.

The vote among the five-judge bench was unanimous, Reuters reported.

“Any consensual sexual relationship between two consenting adults - homosexuals, heterosexuals or lesbians - cannot be said to be unconstitutional,” Chief Justice of India, Dipak Misra, said Thursday as he read the judgment, according to the news agency.

Five citizens had challenged the law, saying they were living in fear of being harassed and prosecuted by police. The court issued its ruling Thursday.

The existing law had made homosexual acts punishable by up to 10 years in prison. It was reinstated in 2013 after four years of decriminalization, Reuters reported.

Gay rights activists welcomed the ruling.

“Thanks to all that fought for this, braving the worst sort of prejudice. This is a good day for human rights,” Meenakshi Ganguly, South Asia director for Human Rights Watch, wrote on Twitter.

In 2009, a New Delhi High Court declared unconstitutional Section 377 of the law, which said same-sex intercourse was against the order of nature. But the Supreme Court overturned that ruling, saying it should be up to Parliament to amend or repeal the law.

But the government left it to the court to decide the validity of the law dealing with consensual sexual acts between two adults.

The Associated Press contributed to this story.