ACROSS the island of Ireland, long regarded as western Europe's last bastion of traditional religious power, a huge change is underway in the way issues of personal and sexual behaviour are handled by society and the state. Voters in the Republic of Ireland will decide on May 22nd on whether to make their country the first in the world to legalise same-sex marriage by popular ballot. The opinion polls suggest that among voters who have made up their minds, a clear majority (around 70%) will say "yes" in the referendum, ignoring the advice of the leadership of the Catholic church to which about 84% of the country, at least formally, adheres. In Northern Ireland, meanwhile, a judge delivered a verdict today that was widely hailed as a milestone victory for gay rights against religious conservatism. She said a Christian-run bakery in Belfast had unlawfully practised "direct discrimination" when it turned away an order for a cake. The case arose when Gareth Lee, a gay-rights activist, approached Ashers Bakery with an order to bake a cake featuring two Sesame Street characters and the slogan "Support Gay Marriage". After initially accepting the request, the bakery contacted the customer and said it could not decorate the cake as requested, on grounds of conscience.

Ordering the bakery to pay compensation, Judge Isobel Brownlie acknowledged that the McArthur family which ran the establishment had strong convictions of faith but she insisted that the business had an obligation to "provide service to all". "The defendants are not a religious organisation. They are conducting a business for profit and, notwithstanding their genuine religious beliefs, there are no exceptions available under the 2006 regulations which apply in this case." Mr Lee (pictured) emerged smiling from the court-room, while the McArthurs pledged to stay in business and consider their options for appeal.

On the face of things, then, trends in the two parts of Ireland are broadly similar. But only on the face of things. The referendum debate in the Republic has taken place against the background of an overwhelming public consensus (including among practising Catholics and indeed priests) that church power in Ireland was until recently excesssive and widely abused. Whether they are believers or sceptics, most citizens of the Republic now accept that priestly power had terrible consequences for vulnerable groups, from single mothers to children in care, who did not conform to the church's notion of the traditional family. As a result, campaigners for a "no" vote have put their case in very cautious and defensive terms. In this climate, the principle that gay people are among the many vulnerable communities who have suffered unfairly, and deserve redress, wins ready acceptance.

In Northern Ireland, things are not quite the same. Hard-line religious conservatism, whether Protestant or Catholic, may be a minority cause but it certainly exists and can make common cause across sectarian boundaries. All the signs are that the Ashers bakery case will redouble the complaints among Northern Irish traditionalists that they are the ones who face bullying and disrespect, and are indeed suffering for their cause. And nothing emboldens people of deep convictions more than a sense that they are suffering.

At the level of practical politics, there will be even more energetic moves by members of the Democratic Unionist Party (for which most Northern Irish Protestants vote) to allow firms to turn away business on grounds of conscience. In the end the initiative will certainly be vetoed by their partners in government, Sinn Fein. But the DUP will no less certainly make huge political mileage out of the case.

If the object of gay-rights campaigners is to change hearts and minds in a once-conservative island, they are making progress on one front, but not all fronts.