NEW DELHI - In a reversal that surprised many gay activists and flew in the face of changes in other countries recently, India's Supreme Court on Wednesday overturned a lower-court ruling, in effect making homosexuality a crime again.

The nation's top court overturned a 2009 Delhi High Court decision that decriminalized homosexual sex between consenting adults. In Wednesday's ruling, the court said the lower court had overstepped its mandate and had no right to augment the law.

Given the slow pace of lawmaking in India, a coming election, and polls suggesting the conservative Bharatiya Janata Party could unseat the ruling Congress Party in national elections, it is likely the ban introduced under British colonial rule will stay in place.

Hundreds gathered in Bangalore, a high-tech hub, after the decision, holding black banners. "Love knows no gender," read one.

Supporters of the decision heralded it as a positive development for society.

"Homosexuality's not natural, disturbs the continuity of life, leaves the future uncertain," said Mujtaba Farooq, president of the Welfare Party of India, a Delhi-based Muslim political group. "This is the unacceptable influence of the West."

While the law has rarely been enforced, analysts say it allows police to harass homosexuals.