People dressed in pink gather at Hong Lim park in Singapore on June 18, 2011 for the Pink Dot event, which promotes freedom to love regardless of sexual orientation, in a photo made available by the organisers

Rights activists reacted with indignation on Wednesday after Singapore's High Court rejected a petition to repeal an archaic law criminalising sex between men.

In a ruling issued on Tuesday, the court said it was up to parliament to repeal a controversial provision in the penal code known as Section 377A, whose constitutionality has been questioned by a gay couple.

"The issue in the present case no doubt is challenging and important, but it is not one which, in my view, justifies heavy-handed judicial intervention ahead of democratic change," Judge Quentin Loh said in his verdict.

"To my mind, defining moral issues need time to evolve and are best left to the legislature to resolve," he added.

The law dates back to British colonial rule in Singapore and carries a maximum penalty of two years in jail for homosexual acts.

While the provision has not been enforced actively by Singapore authorities against men who engage in consensual sex in private, it has become a lightning rod for activists pushing for social reform in the affluent nation.

Two male partners who launched the petition -- graphic designers Gary Lim, 44, and Kenneth Chee, 37 -- now have the option to take the case to the Court of Appeal, the highest judicial body.

A second petition questioning the constitutionality of the provision is still pending before the same court, but activists are not optimistic.

"Once again, modern Singapore falls down when it comes to basic rights. There is no place for this law in a modern thriving country like Singapore," Phil Robertson, deputy director of Human Rights Watch's Asia division, told AFP.

He called the law a "remnant of Victorian era colonialism".

"Rather than gazing pensively at the role of the judiciary in defining moral issues, the judge should have focused on the central issue of whether Section 377A is discriminatory or not, instead of kicking it back to parliament," he added.

Section 377A states: "Any male person who, in public or private, commits, or abets the commission of, or procures or attempts to procure the commission by any male person of, any act of gross indecency with another male person, shall be punished with imprisonment for a term which may extend to 2 years."

Jean Chong, co-founder of lesbian activist group Sayoni, said she was "disappointed and outraged" by the court's decision.

"377A doesn't just criminalise gay men. It justifies a wide range of abusive behaviours and institutionalises discrimination against LGBT people. It sends the wrong signal to the world that Singapore is a backward and regressive state," she told AFP.

LGBT stands for lesbian, gay, bisexual and transgender people.

Increasing numbers of Singaporeans have been coming out in support of gay rights. In 2012, organisers said some 15,000 people attended an annual event called Pink Dot which promotes freedom to love regardless of sexual orientation -- a sixfold increase from the attendance at its inaugural 2009 staging.

Pink Dot leaders said in a statement that the High Court has "missed a golden opportunity to encourage inclusiveness and celebrate diversity amongst Singaporeans".