The Supreme Court ruled on Friday that the US Constitution provides same-sex couples the right to marry, handing a historic triumph to 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 landmark ruling, gay marriage becomes legal in all 50 states.As night fell, the White House was lit in rainbow colors - a symbol of gay pride - to mark the high court's decision. The ruling, the culmination of a long legal fight by gay rights advocates, follows steady gains in public approval in recent years for same-sex marriage. In 2004 Massachusetts became the first state to legalize gay marriage. But the decision may provoke fresh legal fights in some conservative, Republican-governed 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."Immediately after the decision, same-sex couples in many of the states where gay marriage had been banned headed to county clerks' offices for marriage licenses as officials in several states said they would respect the ruling.President Barack Obama, the first sitting president to support gay marriage, hailed the ruling as a milestone in American justice that arrived "like a thunderbolt."