The US Supreme Court has ruled that same-sex couples have a right to marry anywhere in the country.
Gay and lesbian couples can already marry in 36 states and the District of Columbia.
The court's ruling means the remaining 14 states, in the South and Midwest, will have to stop enforcing their bans on same-sex marriage.
The outcome is the culmination of two decades of Supreme Court litigation over marriage, and gay rights generally.
Justice Anthony Kennedy wrote the majority opinion, just as he did in the court's previous three major gay rights cases dating back to 1996.
"No union is more profound than marriage," wrote Justice Kennedy, joined by the court's four more liberal justices after a 5-4 ruling.
The judgment will not take effect immediately because the court gives the losing side roughly three weeks to ask for reconsideration. But some state officials and county clerks might decide there is little risk in issuing marriage licences to same-sex couples.
The cases before the court involved laws from several states that define marriage as the union of a man and a woman. Those states have not allowed same-sex couples to marry within their borders and they also have refused to recognise valid marriages from elsewhere.
Two years ago, the Supreme Court struck down part of the federal anti-gay marriage law that denied a range of government benefits to legally married same-sex couples.
The decision in United States v Windsor did not address the validity of state marriage bans, but courts across the country, with few exceptions, said its logic compelled them to invalidate state laws that prohibited gay and lesbian couples from marrying.
The number of states allowing same-sex marriage has grown rapidly. As recently as October, just over a third of states permitted same-sex marriage.
There are about 390,000 married same-sex couples in the United States, according to Williams Institute at the University of California, Los Angeles, which tracks the demographics of gay and lesbian Americans.
Another 70,000 couples living in states that do not currently permit them to wed would get married in the next three years, the institute says, and roughly a million same-sex couples, married and unmarried, live together in the US.
The Obama administration backed the right of same-sex couples to marry. The Justice Department's decision to stop defending the federal anti-marriage law in 2011 was an important moment for gay rights and President Barack Obama declared his support for same-sex marriage in 2012.
Mr Obama tweeted: "Today is a big step in our march toward equality. Gay and lesbian couples now have the right to marry, just like anyone else. #LoveWins."