WASHINGTON: The US Supreme Court ruled Friday that gay marriage is a nationwide right, a landmark decision in one of the most keenly awaited announcements in decades and sparking scenes of jubilation.
The nation's highest court, in a narrow 5-4 decision, said the US Constitution requires all states to carry out and recognize marriage between people of the same sex.
President Barack Obama praised the ruling, in a fresh victory for the White House.
"Today is a big step in our march toward equality. Gay and lesbian couples now have the right to marry, just like anyone else," Obama tweeted, as the White House changed its online avatar to the rainbow colors of the gay rights movement.
Today is a big step in our march toward equality. Gay and lesbian couples now have the right to marry, just like anyone else. #LoveWins— President Obama (@POTUS44) June 26, 2015
Flag-waving gay rights advocates outside the courthouse cheered the historic ruling and sang.
"The Fourteenth Amendment requires a state to license a marriage between two people of the same sex and to recognize a marriage between two people of the same sex when their marriage was lawfully licensed and performed out-of-State," the court said.
The case was brought by 14 same-sex couples who had challenged de facto bans on gay marriage in Michigan, Kentucky, Ohio and Tennessee.
All four states had insisted in their respective constitutions that marriage could only be a union between a man and a woman.
Read: French Protestant church allows gay marriage blessing
Marriage has been a core institution in society since ancient times, the court said, "but it has not stood in isolation from developments in law and society."
Excluding them from marriage, it said, denied same-sex couples "the constellation of benefits that the states have linked to marriage."
The court added: "Marriage embodies a love that may endure even past death.
"It would misunderstand these men and women to say they disrespect the idea of marriage... They ask for equal dignity in the eyes of the law. The Constitution grants them that right."
The decision came a year after the Supreme Court, in another major ruling, struck down a controversial federal law that denied US government benefits to wedded gays and lesbians.
"This transformative triumph is a momentous victory for freedom, equality, inclusion, and above all, love," said Freedom to Marry, one of several groups battling for LGBT marriage rights.
"For the first time in our nation's history, all loving and committed couples will have the freedom to say, 'I do'," it said in a statement.
"We'll remember this day for the rest of our lives," added the It Gets Better Project, another gay rights organization, in a mass email to supporters.
Two months ago, people queued for days for a chance to hear the arguments that led to Friday's ruling, and activists for and against marriage equality rallied in front of the court.
At issue was the Supreme Court's interpretation of the 14th Amendment of the Constitution, which provides for equal protection under the law.
The nine justices had to decide if this amendment means states are required to recognise marriages that were conducted in other states.
The four states involved in the case, supported by religious and conservative organisations, argued that marriage is based on the biological compatibility of a man and woman.
Obama says gay marriage ruling 'victory for America'
Obama hailed a "gratifying" Supreme Court ruling in favour of gay marriage, saying it shows social changes once thought impossible can be made fact.
"It's a victory for the allies and friends and supporters who spent years, even decades working and praying for change to come. And this ruling is a victory for America," he said.
"This ruling is a victory for America." —President Obama #LoveWins— Barack Obama (@BarackObama) June 26, 2015
"Today we can say in no uncertain terms that we've made our union a little more perfect." —President Obama #LoveWins— Barack Obama (@BarackObama) June 26, 2015
"America should be very proud." —President Obama #LoveWins— Barack Obama (@BarackObama) June 26, 2015