The Supreme Court ruled on Friday that the U.S. Constitution provides same-sex couples the right to marry, in a historic triumph for the American gay rights movement.

The court ruled 5-4 that the Constitution's guarantees of due process and equal protection under the law mean that states cannot ban same-sex marriages. With the ruling, gay marriage will become legal in all 50 states.

Justice Anthony Kennedy, writing on behalf of the court, said that 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."