The U.S. Supreme Court ruled 5-4 on Friday that state bans on same-sex marriage is unconstitutional, ruling that same-sex marriage is now legal in all 50 states. The ruling also means that states must recognize same-sex marriages performed in other states.

Justice Anthony Kennedy, writing on behalf of the court, said the hope of gay people intending to marry “is not to be condemned to live in loneliness, excluded from one of civilization’s oldest institutions. They ask for equal dignity in the eyes of the law. The Constitution grants them that right.”

Justice Antonin Scalia was one of the four Justices to dissent, and called the Court’s decision a “threat to American democracy,” according to CNN.

“The substance of today’s decree is not of immense personal importance to me,” Scalia wrote in his dissension. “But what really astounds is the hubris reflected in today’s judicial Putsch.”

President Obama supported the Court’s decision. “This ruling is a victory for America,” said Obama, the first sitting president to support gay marriage. “This decision affirms what millions of Americans already believe in their hearts. When all Americans are treated as equal, we are all more free.”

The White House changed its Twitter avatar to display the rainbow colors of gay pride, reflecting Obama’s public support of same-sex marriage.

white house twitter