Chants of "Thank you" and "USA" came from the crowd as plaintiffs in the cases descended the court's marbled steps
Kennedy was joined by the court's four liberal justices.
Chief Justice John Roberts, Justices Samuel Alito and Clarence Thomas, and Scalia dissented.
Same-sex marriage has been adopted by 12 states and the District of Columbia. Another 18,000 couples were married in California during a brief period when same-sex unions were legal there.