The Supreme Court on Wednesday pronounced its verdict on a bunch of petitions challenging the Delhi High Court judgement decriminalising gay sex among consenting adults in private.

Must read: Social media gives bipolar reactions to Supreme Court verdict on Section 377, criminalising gay sex

Homosexuality ruling: Government hints at legislative route

Government to exercise prerogative on homosexuality law: Kapil Sibal

It is for legislature to look into desirability of deleting section 377 of IPC, says Supreme Court.

Must read: A Body Blow to Human Rights

Justice GS Singhvi, judge who upheld gay sex as a criminal offence, retires as Supreme Court judge

Also read: Bollywood stars Aamir Khan, Farhan Akhtar, John Abraham, Anushka Sharma express disappointment on Twitter over Supreme Court verdict on homosexuality

The Supreme Court in effect has sets aside Delhi High Court judgement which had decriminalised gay sex.

It however allows appeals filed by various social and religious organisations for making gay sex a criminal offence.

Also read: Gay activists shocked with Supreme Court verdict, a 'black day'

There is no constitutional infirmity in section 377 of IPC which makes gay sex an offence punishable with upto life imprisonment.

Justice GS Singhvi, judge who upheld gay sex as a criminal offence, retires as Supreme Court judge

The apex court verdict upholding Section 377 came 21 months after it had reserved its verdict in March 2012.

With the apex court verdict, the operation of penal provision against gay sex has come into force.

Article 377 and LGBT rights: Here's what you need to know Read

Watch video on the ruling:

"Historical opportunity to expand constitutional values has been lost. It is surprising that the court which does judicial review on many issues has put the ball in the court of Parliament to decide on homosexuality," said ASG Indira Jaising on Supreme Court verdict on homosexuality. Read

As soon as the verdict was pronounced, gay activists in the court looked visibly upset.

Kolkata LGBT activists to continue fight for rights, respect Read

Reacting to the verdict, gay rights activist Pallav Patankar, said, "We are back into the dungeon all over again".

"Considering that this judgement is coming just a day after Human Rights Day, I think its a bad reflection on the state of things to come in this country. I am really not happy about it...

"We will fight on and we will labour on because the fight is not over yet. I think the international community as well as others are there to see what is happening in the country and I think we need to think where we exactly are going," he said.

Is it a crime that a child is born a lesbian or gay? activists ask Supreme Court Read

Heart-breaking verdict,will use all legal options available before us:Deepti Sharma,voice-raiser LGBT community pic.twitter.com/de40naDanH — ANI (@ANI_news) December 11, 2013

We will seek review of SC verdict on homosexuality, says gay rights NGO Naz Foundation.

Another gay rights activist, Shovini Ghosh, expressed her "shock" over the apex court verdict, saying it is "completely unsatisfactory".

"The Delhi High Court had given unprecedented protection to all the minorities. We are going to plan our strategy. This is a movement which should go on, we are not going to give up. I will first challenge the idea that the religious group can dictate something in a secular country. I will not go by what they say. All kinds of criminal acts, like demolition of Babri Masjid was done by religious groups... I think government has actually changed its position from what it had said during the hearing that it stands enlightened in light of the Delhi High Court verdict," she said.

A bench of justices GS Singhvi and SJ Mukhopadhaya delivered the verdict on petitions of anti-gay right activists, social and religious organisations against the 2009 verdict of the high court, which decriminalised gay sex.

The judgement was pronounced by Justice Singhvi on his last working day as he will be retiring tomorrow.

The bench had reserved its order in March last year after granting day-to-day hearing of the case from February 15, 2012.

While hearing the appeal, the apex court had pulled up the Centre for its "casual" approach on decriminalisation of homosexuality and also expressed concern over the Parliament not discussing such important issues and blaming judiciary instead for its "over-reach".

While pleading for decriminalisation of gay sex, the Centre had subsequently told the court that the anti-gay law in the country had resulted from British colonialism and the Indian society was much more tolerant towards homosexuality.

The Delhi High Court had on July 2, in 2009 decriminalised gay sex as provided in Section 377 of the Indian Penal Code (IPC) and had ruled that sex between two consenting adults in private would not be an offence.

Section 377 (unnatural offences) of the IPC makes gay sex a criminal offence entailing punishment up to life term.

The petition seeking to decriminalise gay sex was filed in the high court by Naz Foundation.

Senior BJP leader BP Singhal, who died in October last year, had challenged the high court verdict in the Supreme Court saying such acts are illegal, immoral and against the ethos of Indian culture.

Religious organisations like All India Muslim Personal Law Board, Utkal Christian Council and Apostolic Churches Alliance too had challenged the judgement.

The Delhi Commission for Protection of Child Right, Tamil Nadu Muslim Munn Kazhgam, SD Pritinidhi Sabha, Joint Action Council, Raza Academy, astrologer Suresh Kumar Kaushal, yoga guru Ramdev's disciple S K Tijarawala, Ram Murti, Bhim Singh, B Krishna Bhat had also opposed the verdict.

The Centre had earlier informed the apex court that there are an estimated 25 lakh gay people and about seven per cent (1.75 lakh) of them are HIV-infected.

In its affidavit, the Union Health Ministry had said it was planning to bring four lakh high-risk 'men who have sex with men (MSM)' under its AIDS control programme and it has already covered around two lakh of them.

Here are some Twitter reactions to the judgment:

decriminalisation is NOT judging the morality of gay sex. it is recognising the right of choice of citizens in free india. — Harish Salve (@hsalve) December 11, 2013 Blackmailers rejoice! The Supreme Court is on your side. — Jerry Pinto (@mahimkajerry) December 11, 2013

Regressive. That's the word for this verdict. #Sec377 — Nikhil Kulkarni (@VocabSahab) December 11, 2013

If we still retain every bad law passed by the British, then what for we got independence? To pass more bad laws ourselves, a? Ok. #Sec377 — Ramesh Srivats (@rameshsrivats) December 11, 2013

I don't own a smartphone or tablet. I thought I was still living in the past. SC confirmed my suspicions by criminalising gay sex #Sec377 — What's in a name? (@k0ol1) December 11, 2013

Shocked at the social intolerance towards #lgbt community in India #Sec377 #mylifemyright — Vidya Krishnan (@VeeKri) December 11, 2013

“Sex between consenting same sex adults in private is criminalised but marital rape isn't. #Sec377 #SupremeCourt #LGBTrights” — Chaiti Narula (@Chaiti) December 11, 2013

Supporters of the SC verdict were also in large numbers. "This is not a retrograde judgment," a lawyer for a Muslim charity who received the judgment told reporters outside the court. "All the communities - Muslims, Christians, the majority community Hindus - have all challenged the judgment of the Delhi High Court."

Court has respected sentiments of millions of Indians and declared homosexuality a crime: Baba Ramdev Read

We welcome this judgement of Supreme Court: Zafaryab Jilani,Member All India Muslim Personal Law Board on #Section377 pic.twitter.com/o6uQmXEwYK — ANI (@ANI_news) December 11, 2013

Here are some anti-gay tweets after the verdict,

happy with the verdict homosexuality is d no.1 cause of aids n std's.its a mental disorder.its against our rich culture #Sec377 #Section377 — Owais Khan (@ows316) December 11, 2013

salutes to supreme court #Section377 — Chocka (@PCLINGAM) December 11, 2013

Here is a time line of the LGBT struggle for acceptance in India:

The Supreme Court set aside the Delhi High Court verdict decriminalising gay sex and upheld the legality of section 377 of the IPC, entailing imprisonment with upto life term.

Following is the chronology of the 12-year-long legal proceedings:

2001: An NGO fighting for gay rights, Naz Foundation, files PIL in Delhi High Court seeking legalisation of gay sex among consenting adults.

Sept 2, 2004: High Court dismisses the PIL seeking decriminalisation of gay sex.

Sept: Gay right activists file review petition.

Nov 3: HC dismisses the review plea.

Dec: Gay rights activists approach the apex court against the order of the High Court.

Apr 3, 2006: Apex court directs the HC to reconsider the matter on merit and remands the case back to High Court.

Oct 4: HC allows senior BJP leader BP Singhal's plea, opposing decriminalising gay sex, to be impleaded in the case.

Sept 18, 2008: Centre seeks more time to take stand on the issue after the contradictory stand between the Home and Health ministries over decriminalisation of homosexuality.

HC refuses the plea and final argument in the case begins.

Sept 25: Gay rights activists contend that the government cannot infringe upon their fundamental right to equality by decriminalising homosexual acts on the ground of morality.

Sept 26: HC pulls up the Centre for speaking in two voices on the homosexuality law in view of contradictory affidavits filed by Health and Home ministries.

Sept 26: Centre says gay sex is immoral and a reflection of a perverse mind and its decriminalisation would lead to moral degradation of society.

Oct 15, 2008: HC pulls up the Centre for relying on religious texts to justify ban on gay sex and asks it to come up with scientific reports to justify it.

Nov: Government in its written submission before the HC says judiciary should refrain from interfering in the issue as it is basically for Parliament to decide.

Nov 7: HC reserves its verdict on petitions filed by gay rights activists seeking decriminalisation of homosexual acts.

Jul 2, 2009: HC allows plea of gay rights activists and legalises gay sex among consenting adults.

Jul 9: Delhi astrologer challenges HC verdict in SC.

Later on, several others including BJP leader Singhal (since dead), religious organisations, rights activists and yoga guru Ramdev's disciple have also opposed the judgement.

Feb 15, 2012: SC begins final day-to-day hearing in the case.

March 27, 2012: SC reserves verdict.

Dec 11, 2013: SC sets aside the 2009 Delhi High Court order which had decriminalised gay sex.

Verdict is disappointing,we aren't going to give up,fight will continue:Youth wing member,Humsafar Trust #Section377 pic.twitter.com/y1QfByLuPm — ANI (@ANI_news) December 11, 2013

Political reactions to the ruling:

Terming the judgement as "disappointment", TMC MP Derek O'Brien said, "We are living today in a liberal world and the judgement is disappointing. Earlier in 2006, there was a letter written and signed by Amartya Sen, Vikram Seth, Shyam Benegal and myself among others on it. Because sometime the court does very interesting views on red lights, I think it does same thing on gay rights."

CPM MP Sitaram Yechury said, "It is now a legal matter in the sense that the Supreme Court has overturned the HC ruling and on that basis it has made certain observation. Those observations involve the invoking of the executive's responsibility in law making in order to resolve the conflict.

"Since the judiciary has sought the executive's involvement, the executive have to properly study what the judgement is all about."

"I would imagine anything the Supreme Court says is the law of the land. I have not read the judgement. If the SC says the legislature should do something, the legislature should do something. When a legislature does something, it takes into account a whole host of circumstances. I would imagine the SC has taken into account the overall conditions prevailing in our country and if required the legislature could do something which is reflective of the what the people want and within the four corners of the Constitution. The legislative will apply its mind and come to some conclusion," Salman Khurshid said.

Congress MP Mani Shankar Aiyar said the verdict requires "serious thought" because there must be equality for all human beings and "these kind of preferences are almost built into your genes. Therefore to discriminate against people to have a particular preference is not something I would advocate. I have not seen the SC judgement. We would be debating it later but in principle I think all human being should be treated equally."

Naresh Agarwal of SP supported the verdict saying "Indian society is not prepared for it (homosexuality)...this does not suit the Indian culture.

He said the verdict has come at a time when the country is trying to safeguard its culture, ethos, values and traditions.

Supreme Court order on Section 377 regressive: JD(U)'s Shivanand Tiwari Read

Gay sex verdict: Govt indicates it will take legislative route Read

Supreme Court verdict must be respected by government: Kapil Sibal Read