NBCNews – The U.S. Supreme Court on Friday made marriage for same-sex couples legal nationwide, declaring that refusing to grant marriage licenses to gay and lesbian couples violates the Constitution.

The landmark ruling will produce the most significant change in laws governing matrimony since the court struck down state bans on inter-racial marriage almost 50 years ago.

The majority opinion in the 5-4 decision was written by Justice Anthony Kennedy.

” The constitution promises liberty to all within its reach,” Kennedy wrote.

A total of 36 states now permit gay couples to get married, covering roughly 70 percent of the US population. Today’s ruling means the bans must end in the other 14 states — Alabama, Arkansas, Georgia, Kentucky, Louisiana, Michigan, Mississippi, Missouri, Nebraska, North Dakota, Ohio, South Dakota, Tennessee and Texas.

The decision capped a remarkably quick turnaround in public and judicial acceptance of same-sex marraige. In the past 18 months, court rulings struck down marriage bans in rapid succession — nearly 60 separate decisions in more than half the states.

Today’s ruling overturned a decision from the Sixth Circuit Court of Appeals in Cincinnati, which said states had legitimate reasons for maintaining the traditional definition of marriage. The appeals court also said it would be better “to allow change through the customary political processes” instead of the courts.

Public opinion has shifted dramatically in recent years. The first Gallup poll on the subject showed only 27 percent approval for same-sex marriage in 1996. Gallup’s most recent poll, taken last month, showed 60 percent approval.