DUBLIN — If there was any doubt about the pace at which acceptance of gay rights is taking root in societies around the world, consider Ireland.

On Friday, voters in this once deeply Roman Catholic country will decide whether the Irish Constitution should be amended to add a tersely worded declaration:

“Marriage may be contracted in accordance with law by two persons without distinction as to their sex.”

If the amendment passes, Ireland will become the first country to legalize same-sex civil marriage by popular vote.

The referendum’s very consideration, and the relative civility of the discourse, are a measure of the waning power of the Church, which has seen its pews empty after clerical pedophile scandals and amid rising secularism.

But it is also a reflection of a surprisingly swift shift in attitudes in many societies, where religious teachings and conservative values are giving way to acceptance of laws that support the privacy of individuals and expand marital and other rights.

Unlike the vitriolic fights here in the past over abortion and divorce, the referendum is stirring about as much excitement as might surface during a local council election.

Gaggles of campaigners hand out leaflets in shopping malls and in housing estates. Lamp posts are wrapped with colorful posters bearing catchy slogans. Talk radio chatters away, trying desperately to stir up debate.

The outcome is by no means certain. Though polls are showing greater support for a yes vote than for a no, there is widespread acknowledgment that this is the kind of issue that polls cannot always accurately gauge.

Until the past few weeks, the Church has held whatever moral firepower it still possesses, preferring to leave the public battles to a variety of Catholic groups.

In what many interpret as a sign of their concern over alienating those still in the middle ground, Church leaders waited until two weeks before the vote to distribute pastoral letters to Sunday worshippers.

In a letter to congregations in his diocese, Bishop Brendan Leahy of Limerick wrote:

“Should the amendment be passed, it will become increasingly difficult to speak any longer in public about marriage as being between a man and a woman. We also ask: ‘What will we be expected to teach children in school about marriage? Will those who sincerely continue to believe that marriage is between a man and a woman be forced to act against their conscience?’”

But in a country where about 80 percent of people are still identified as Catholics, though largely not practicing, no ballot initiative can pass without Catholic votes. And those most likely to go to church on Sundays — and receive the pastoral letter — are older, live in rural areas, and are most likely to vote.

Supporters of the measure also fear that a largely silent middle group could turn out and tip the vote to the referendum’s defeat.

Still, the amendment has wide support from all the main political parties, trade unions, business organizations, and various social groups, as well as from sports stars and celebrities. Of 226 members of Parliament, only six have indicated that they will personally cast their ballots against the measure.

Parliament adopted civil partnerships for same-sex couples in 2010, but supporters of the amendment say such arrangements do not go far enough.

In a recent opinion article in The Irish Independent, former Justice Minister Alan Shatter wrote:

“This is not equality, and for many gay people, civil partnership, while it was a step in the right direction, does not give the relationship they have and the commitment they have made to the person they love the same recognition as the relationship of a heterosexual couple. They feel discriminated against, regarded as second-class citizens, and they are hurt by it.”

Opponents have broadly defined the implications of the amendment, saying it could affect issues like surrogacy, adoption, and education, as well as morality and family values.

“We are not against equality, but this is about changing the primary, natural, fundamental unit of society,” said Ben Conroy, a spokesman for the Iona Institute, a conservative advocacy group. “It is about obliterating the right of a child to a mother and father.”

While many states and other countries have moved to broaden equal rights for gays, resistance lingers, even in the West. France faced strong opposition and angry protests before it allowed same-sex marriage. In many places, including the United States, many of the rights questions are being decided in the courts.

In the Irish Republic, opponents of the measure have been careful to distance themselves from events in Northern Ireland, where religiously conservative Protestant politicians have blocked proposals to allow same-sex marriage that would put it in line with the rest of Britain.

However, the courts have stepped in there as well, and on Tuesday a judge in Belfast County Court ruled that a baker was guilty of discriminating against a customer, Gareth Lee, because of his sexual orientation when the bakery refused to provide a cake inscribed with the words “Support gay marriage.” The owners of the bakery said they refused because of their “genuine deeply held religious beliefs.” Lee agreed to accept 500 pounds (about $775) in damages.

Ireland has been reluctant to tinker with its 1937 constitution, particularly on social issues. Nevertheless, it has taken on two previous battles over teachings that are abhorrent to the Church.

The legalization of abortion has been on the ballot three times in the past 30 years. The last time a referendum was considered, in 2002, it was rejected by a little less than a percentage point of the voters: 50.4 percent to 49.6 percent. Successive governments have done everything in their power to avoid another vote.

Divorce was legalized in 1995 after another vitriolic ballot, but only by the thinnest of margins.

Polls published on Sunday in three national newspapers showed that support for the amendment was still comfortably ahead, but the wide gap has been narrowing. The Millward Brown poll for The Irish Sunday Independent found a 13-point drop-off in support from the month before, to 69 percent of people polled. Polls in the Irish edition of The Sunday Times and The Sunday Business Post also put the support vote well ahead.

Still, opponents have been encouraged by the way the pollsters were so wrong about this month’s British election. And the closeness of the vote on divorce, which was not predicted in the polls, has given them hope that voters are simply not expressing their views on a matter that many may find overly personal.

Gay rights groups are relying heavily on the support of the former Irish president Mary McAleese, a canon lawyer who is a respected scholar of the Church and whose son Justin is gay.

“Will a yes vote affect my heterosexual marriage or any heterosexual marriage?” McAleese said in a speech Tuesday, noting that she has been married to her husband for almost 40 years. “Not in the least. But it will greatly affect my life and the lives of all parents of gay children. It will give us peace of mind about our children’s future and pride in our country’s commitment to true equality. It will right a glaring wrong.”

Prime Minister Enda Kenny, a churchgoing Catholic, is supporting the proposal first championed by his coalition partner, the left-leaning Labour Party.

Kenny, who had vacillated on the issue, said he was convinced after learning of the difficulties many gay people faced in recent years. His government includes elected representatives who are gay; Health Minister Leo Varadkar recently went public about his homosexuality.