WASHINGTON, June 26 (Xinhua) -- The U.S. Supreme Court on Friday ruled that there is a right to same-sex marriage in all 50 states across the country.

Justice Anthony Kennedy authored the 34-page 5-4 decision, saying that marriage is a "keystone of the nation's social order," and that there is "no difference between same- and opposite-sex couples with respect to this principle."

"It is demeaning to lock same-sex couples out of a central institution of the nation's society, for they too may aspire to the transcendent purposes of marriage," he said.

The fierce national debate over same-sex marriage, which spans more than a decade, began when gay and lesbian couples started to challenge state-approved bans on gay marriage in courts across the United States.

Most of the bans were struck down as unconstitutional in a succession of federal court rulings, but that string of victories for gay marriage supporters came to an end in November, when the 6th Circuit Court of Appeals upheld bans in the states of Ohio, Tennessee, Michigan and Kentucky.

The ruling created a lower court split, forcing the high court to answer calls from those on both sides of the fight to revisit same-sex marriage.

The issue has split Americans and politicians on mostly partisan lines. A record 57 percent of Americans support same-sex marriage, according to a recent Pew Research Center poll. But while almost two thirds of Democrats and independents back legalizing same-sex marriage, just one third of Republicans share that view.