In another time, in another Ireland, Rev. Martin Dolan might be facing excommunication – at the very least – from the Catholic Church. In January, he gave a sermon urging the congregation of Dublin's Francis Street Parish to vote in favour of same-sex marriage in a looming referendum.

And then Father Martin went on to reveal that he was gay himself.

But in this rapidly changing Ireland, Father Martin's announcement was greeted with a standing ovation in this church, which is nestled between a laundromat and an antique store in Dublin's arts district. And on Sunday the pews were full and more worshipers stood along the walls to hear Father Martin give mass, days before Friday's referendum, which – if the opinion polls are accurate – will see Ireland become the first country in the world to legalize gay marriage via a nationwide vote.

Story continues below advertisement

That polls suggest 70 per cent of Ireland is poised to vote in favour of same-sex unions is remarkable enough. That it seems ready to do so in defiance of the country's bishops, who are urging a No vote to preserve what they say is a sacred definition of marriage, suggests that a quiet revolution has taken place in this once staunchly conservative land.

"I will be enormously proud of Ireland if [the referendum] passes," said Donal Mulligan, a lecturer in the school of communications at Dublin City University who co-founded a website urging people to vote Yes.

Some 84 per cent of Irish still identify themselves as Catholic, and almost half the country goes to mass every Sunday. But Friday's vote feels very much like a referendum on the church – and how much influence it should have in affairs of the state.

"There's an element who would like to vote the opposite of the way the church tells them to, just to give the church a kick in the teeth," said Michael Kelly, editor of The Irish Catholic, a newspaper that has supported the No side. "Being Catholic, for a lot of Irish people, doesn't mean adherence to the church's teachings like it once did. Lots of Irish people have renegotiated their relationship with the church."

That renegotiation, Mr. Kelly said, began in the wake of a series of sexual-abuse scandals that came to light in the 1980s and 1990s involving senior members of the clergy and hundreds of victims, most of them children. Even more damaging were the church's efforts to cover up the abuse; a government report found the church began taking out insurance against potentially damaging lawsuits long before it publicly acknowledged the abuse was taking place.

"The psychological effect on people has been: If the church is wrong about that, the church could be wrong about a lot of things," Mr. Kelly said.

Edicts from priests and bishops used to have powerful sway over this country. Divorce was legalized here only in 1995, and even then just 50.2 per cent voted in favour of legalization; with the bishops leading the opposition, a 1986 referendum on the same topic was handily won by the No side.

Story continues below advertisement

Well into the 1980s, those wanting to buy condoms had to travel to Northern Ireland (which is part of the United Kingdom) because they were available only by prescription south of the border.

But in this referendum, the church and its allies seem very badly outgunned. The leaders of all four main political parties are campaigning for the Yes side, and both main newspapers ran editorials this weekend urging readers to vote Yes. The list of celebrities who have said they will be voting Yes ranges from U2 frontman Bono to Sinn Fein leader Gerry Adams.

Prime Minister Enda Kenny, a centre-right politician, is among the Irish Catholics who still consider themselves devout, even as they have moved away from some of the church's teachings. In an interview with the Sunday Independent newspaper, he recalled the church's earlier opposition to contraception and divorce and said gay marriage would soon gain the same level of acceptance. "The world has changed utterly. There was a time when you couldn't marry a Protestant," he said.

Canada has played a background role in the argument here. The referendum is the end of a legal battle that began when Ann Louise Gilligan, a former nun, and Katherine Zappone, now an Irish senator, got married in Vancouver in 2003, then returned to ask the Irish courts to recognize it.

Several courts have since ruled that the Irish Constitution provided only for marriages between a woman and a man. If Friday's referendum passes, the Constitution will be amended to read "marriage may be contracted in accordance with law by two persons without distinction as to their sex."

The No side is largely run by the Iona Institute, a conservative think tank that has printed thousands of posters with slogans such as, "Two men can't replace a mother's love." Playing on the belief that many Irish are quietly opposed to gay marriage but feel they can't say so out loud, new posters have appeared in recent days urging, "Don't be silenced."

Story continues below advertisement

Ireland's bishops, anxious to avoid the appearance of clashing with the state, initially took a low profile in the campaign, before escalating their involvement in recent weeks with a series of statements urging voters to "reflect" before they voted to change the definition of marriage.

But even the leadership of the Catholic Church seems to be positioning itself for the day after a Yes vote. "The church's teaching on marriage and the family and its relevance to social ethics will remain the same, no matter the referendum result," the Archbishop of Dublin, Diarmuid Martin, wrote in a letter distributed to churches in his archdiocese.

The cracks in Ireland's former unity of belief are evident even within the church. The country's most famous nun, Sister Stanislaus Kennedy – who is revered for her work with the homeless – made headlines by announcing that she too would go against the bishops and vote Yes on Friday. "We have discriminated against members of the gay and lesbian community for too long. This is a way of embracing them as full members of society," she told The Irish Times.

At the Francis Street Parish, Father Martin said nothing to his congregation on Sunday about the referendum. But his discussion of the gospel tale of how Jesus washed his disciples' feet seemed weighted with special significance.

"This is a story about happiness, about how to be happy," he said, walking amongst the pews as he spoke. "Everybody needs friends. Everybody needs family. Everybody needs someone to be with."

He seemed to point to other battles that lie further ahead. At the end of the mass, he called up three young girls who had just received first communion and asked them to give the farewell blessing. Women, he pointed out, aren't allowed to be priests in the Roman Catholic Church. "But I'm confident that will change," he said.