In a landmark victory for LGBTQ rights, the United States Supreme Court on Friday ruled that same-sex marriage is constitutional.

In the 5-4 decision, the court declared that same-sex couples have the right to marry everywhere in the country.

Gay marriage bans in 14 states will have to be overturned.

The majority opinion was written by Justice Anthony Kennedy, who also authored the court's previous three major rulings on gay rights.

In the Supreme Court case of Obergefell v. Hodges, the state of Ohio would not recognize a marriage performed in Maryland between two longtime same-sex partners.

Now the court has ruled that same-sex couples have a constitutional right to marry - and that other states are required to recognize same-sex marriages performed out of state.

In 2013, the Supreme Court struck down a key provision of the Defense of Marriage Act.

President Barack Obama called the constitutional right to same-sex marriage a major step forward in the march towards equality.

The president delivered a statement from the White House shortly following Friday's ruling.

He says it would not have been possible if not for all of those who have fought for LGBTQ rights.

“This ruling will strengthen all of our communities by offering to all loving same-sex couples the dignity of marriage across this great land.“ Obama said. "Progress on this journey often comes in small increments. Sometimes to steps forward, one step back, held by the persistent effort by dedicated citizens,. And then sometimes there are days like this, when that slow, steady effort is rewarded with justice and arrives like a thunderbolt," he added.

A total of 36 states plus Washington D.C. had already legalized same-sex marriage, including New York.

Some New Yorkers are celebrating the court's decision outside Manhattan's Stonewall Inn - long considered the birthplace of the gay rights movement.

In June 1969, police raided the bar but patrons fought back, sparking several days of protests.

Earlier this week, a committee voted to designate the West Village bar as a New York City landmark because of its ties to LGBTQ history.

In a statement, Governor Andrew Cuomo praised the Supreme Court ruling, saying in part, "From Stonewall to Edie Windsor, New Yorkers have always been on the front lines of the fight to ensure equality and fairness for all. Today, we are proud New Yorkers and proud Americans. Today, progress marches on."

Governor Cuomo has also directed the Port Authority to change the lights on the One World Trade Center spire to rainbow this Sunday in recognition of the decision.

Meantime, not everyone is celebrating the decision.

The Conservative Party of New York released a statement opposing the ruling saying, "The Supreme Court has summarily dismissed the fact that marriage is an institution with a unique meaning and purpose -- to bring two halves of humanity together to give children the best opportunity to the love of both their mother and father."

The American Family Association's president Tim Wildmon also released a statement criticizing the decision, saying, in part "In states across the nation, voters acted through the democratic process to protect marriage and the family. Yet, courts around the country chose to disregard the will of the people in favor of political correctness and social experimentation."