The move from decriminalising homosexuality to granting legal status to gay marriages may seem a simple and logical step. After all, the quintessentially liberal principle is that all people ought to be treated with equal respect and without discrimination in every matter. This dictum would apply equally to the question of marital preferences as with sexual orientation. But contemporary history tells a more complex story.

The United States Supreme Court last week gave assent to same-sex marriages in five states. It did so by declining to hear challenges to earlier appeals to court rulings. Since the relevant circuit courts also have jurisdiction in six more states, the latest decision is in effect expected to allow marriages among homosexuals in a majority of states — 30 of them. This seeming surge in political and judicial support is a far cry from the situation that existed just a decade ago.

Thirteen states amended their constitutions in 2004 to ban same-sex marriages, reacting to Massachusetts’ move to allow them. They were echoing the spirit of the 1996 federal Defense of Marriage Act, which defined the institution of marriage as a union between man and woman. It further authorised states that banned such marriages to withhold recognition to gay couples from other states where this was legal.

But then, two Supreme Court rulings last year repudiated the view that a world where gays and lesbians were wedlocked was an affront to heterosexual marriages — a view that was espoused by social conservatives and religious groups. In one ruling it struck down the 1996 legal provisions as being unconstitutional and violative of the Fifth Amendment protecting individual liberty, and a denial of equal benefits to same-sex couples. In the other, the court nullified the ban on gay marriages in California, which, incidentally, was the first state to overturn the ban on inter-racial marriages in 1948. A number of states have since lifted the ban on same-sex marriages, including the five states that have now won the Court’s backing.

Globally, 17 countries — predominantly European ones, besides two from Latin America — have ended the exclusion of same-sex couples from marriages and consequent social and legal benefits. While The Netherlands was the first to do so in 2001, Britain, France and Brazil amended their laws suitably last year. Iceland’s Jóhanna Sigurðardóttir was the world’s first openly lesbian Prime Minister, between 2009 and 2013, and was the country’s longest-serving member of Parliament. Freedom and equality, it is fairly obvious, eventually and inexorably lead to a gender-neutral stance on many social questions that may have been settled by convention in the past.