Cathal McNaughton / Reuters

Last summer, I sat inside Dublin City Hall on a dazzlingly bright day and watched a succession of LGBT choruses from around the world sing their hearts out to an audience that spilled over onto the porches and steps. There were show tunes and folk songs and more interpretations of “Molly Malone” than I could count, including one by a men’s choir that ran: “In Dublin’s fair city / where boys are so pretty … ” (The lyrics traditionally refer to the girls of Dublin, where the singer meets the sweet fishmonger the song is named for.) Dublin was for the first time hosting Various Voices, an international LGBT choir festival, and a new Ireland was emphatically on display: cosmopolitan, tolerant, diverse, sunny.

On Friday, May 22, Irish citizens will vote on whether or not to insert the following line in their constitution: “Marriage may be contracted in accordance with law by two persons without distinction as to their sex.” If the referendum passes—and current polls suggest it’s got a decent shot—Ireland will become the first country in the world to approve gay marriage through a popular vote, rather than by legislation or judicial decision. The fact that the outcome is too close to call represents a stunning transformation for a nation that the future Pope Paul VI described in 1946 as “the most Catholic country in the world.” How did it happen, and what does it mean for Ireland? Is the country just taking another step from a distinctive identity to a homogenized, Western European norm? As I walked past Google’s Europe headquarters to a raucous sing-along fundraiser for the advocacy organization Marriage Equality at the brand-new Bord Gáis Energy Theatre later that same summer night, it was easy to think so: Here was global capitalism remaking the land of saints and scholars in its own image, for better and for worse.

Beyond the high-tech corridor of the Dublin Docklands, though, something more interesting is going on. On the other side of the country, Lainey O’Keefe runs a guesthouse for women with her partner, Rita, just outside Castletownbere, a fishing town on the Beara Peninsula in County Cork. The county’s main city is Ireland’s second-largest urban area, one with its own strong tradition of gay community and activism. But only 123 civil partnerships (domestic unions that lack the full rights of marriage) were solemnized in County Cork between April 2011—when they were first legalized—and June 2014, compared with 772 in the city of Dublin alone. Beara itself is a rural, windswept place on Ireland’s southwest coast, just over two hours’ drive from Cork city. When I stayed with Lainey and Rita, they explained that they generally avoided public displays of affection, even holding hands, in their town: There was no need, they said, to go out of their way to offend their more conservative or religious neighbors. But when the pair registered their civil partnership, those same neighbors dropped in with presents.

Pressure from Europe helped start the revolution in Ireland’s approach to homosexuality. But in recent years, the country has developed its own distinctive approach to gay rights, unique in the world for its simultaneous embrace of sexual diversity and emphasis on family and community. A rejection of Church authority but not of many Catholic ideals, it could offer global Catholicism itself a way forward.

* * *

This repudiation of Church authority is striking in a country where national identity and Catholic values have long been entwined. Ireland’s 1937 constitution, adopted 15 years after the Irish Free State came into being, enshrined the country’s independence from Britain by emphasizing Ireland’s distinctive nexus of faith and nationality, explicitly acknowledging the “special position” the Catholic Church held there. Irish law promoted reproduction and rural family life by outlawing divorce, abortion, contraception, and homosexuality, and limiting women’s access to paid employment. Ireland’s schools and hospitals were run by religious orders, and successive Irish governments were overtly deferential to the Church hierarchy. In 1951, for example, the minister for health resigned after proposing a healthcare program for mothers and children that was opposed by Catholic authorities. Catholicism was woven into cultural and national life, from the singing of the hymn “Faith of Our Fathers” alongside the national anthem at sporting events, to the ringing of the Angelus bell as a call to prayer and reflection at 6 p.m. each evening on national radio and television.

But the Church’s position in Irish society had begun to change by 1970s. In 1972, a popular referendum removed the constitutional clause recognizing the Catholic Church’s “special position”; it passed with nearly 85 percent of the vote. The overwhelming margin reflected the Irish Church hierarchy’s support for removing the clause, which it believed inflamed tensions with Protestants in Northern Ireland while offering no apparent benefit at home. In retrospect, though, it also suggests an emerging willingness to limit the Church’s authority in state affairs.

The gay-rights movement got underway around the same time with the foundation of groups like the Sexual Liberation Movement and the Irish Gay Rights Movement. Irish television broadcast a documentary on homosexuality in 1977 that showed happy scenes in a gay disco in Dublin’s Parnell Square; another documentary two years later explored the idea, now more widely entertained, that nationalist martyr Patrick Pearse, the leader of the 1916 Easter Rising against British rule, might have been a latent homosexual. Such programs generated considerable backlash: When two lesbian ex-nuns appeared on Irish television in 1985, for example, they were met with pickets outside the studio doors.

And the Irish ban on homosexual acts between men remained in place, even if it was only sporadically enforced. (As in the United Kingdom, sexual acts between women were never directly outlawed, though lesbians also faced legal and social discrimination.) Even as the ban faced a challenge in the Irish Supreme Court in 1983, the murder of a gay man in a Dublin park was punished only with short suspended sentences for the perpetrators. It wasn’t until a decade later that Ireland decriminalized homosexual acts between men—and that was only after the European Court of Human Rights found that Irish law breached its citizens’ right to privacy. (Homosexual acts had been decriminalized in England and Wales 36 years earlier, in 1967, in part of a general trend toward decriminalization in Western Europe during the late 1960s and early 1970s. Northern Ireland followed suit only in 1982, and in the United States homosexual acts would not be legal in all 50 states until 2003, following the Supreme Court decision in Lawrence v. Texas.) Ireland’s case emphatically represented change from above rather than below: A poll in June 1993 showed that only 34 percent of respondents in Ireland supported legalizing homosexual acts between adults.

Meanwhile, recognition of same-sex relationships came slowly. Article 41 of the Irish constitution recognizes the family as “a moral institution possessing inalienable and imprescriptable rights,” pledging the state to protect it “as the necessary basis of social order,” and in particular to “guard with special care the institution of Marriage, on which the Family is founded.” Irish courts have interpreted this definition narrowly, generally recognizing only families formed through heterosexual marriage—not an unreasonable interpretation, since Article 41 also enshrined a state duty “to ensure that mothers shall not be obliged by economic necessity to engage in labour to the neglect of their duties in the home.” In a 2007 case, the Irish Supreme Court found that a lesbian couple with their child did not constitute a “family,” though Justice John Hedigan wrote movingly: “It seems to me that the state has a strong interest in the recognition, maintenance and protection of all de facto families that exist since they are inherently supportive units, albeit unrecognised by the Constitution.” The 2011 provision for civil partnership between same-sex couples kept that institution distinct from marriage—significantly, civil partnerships could not be solemnized by clergy or in a church, and the barriers to dissolution were much lower. And civil partnerships still did not qualify as “families” under the constitutional definition.

Irish liberalization—with regard to homosexuality as well as divorce, contraception, and abortion, which have all seen significant legal reform if not outright legalization—has come about not through a gradual replacement of older conservative generations, but because huge numbers of people have simply changed their minds, according to the sociologist Pat Lyons’s careful sifting of opinion polls. In the case of gay marriage, I believe they are changing their minds, not necessarily about the importance of family to Irish life, but about the definition of family.

This is possible in part because the source of the constitution’s vision of family, the Catholic Church, has suffered a near-collapse in prestige and authority, particularly because of revelations about the sexual abuse of children that was covered up by the church hierarchy. Government inquiries into this pattern of abuse and denial, such as the Ferns and Cloyne reports, became household names, symbols of the shattering of the Church’s reputation in Ireland. The Irish overwhelmingly still believe in God, but they’ve lost their faith in the Catholic Church: While 51 percent had great confidence in the institution in 1981, only 19 percent did in 2008.

But, like Lainey and Rita, the Irish gay-rights movement has met its conservative neighbors at least halfway. In their 2013 submission to the Constitutional Convention, a forum tasked with developing recommendations on constitutional revision in a variety of areas, the Gay & Lesbian Equality Network noted that “more than a thousand couples have registered and celebrated their civil partnerships which have been treated as weddings by family, friends and neighbours across every county in Ireland.” Marriage Equality argued in its submission that Ireland was ready to “cherish same sex families equally with heterosexual married families”; its first point in favor of same-sex marriage was that “marriage is good for families and society.”

For some, the payoff only comes after the death of an older generation. As one gay man interviewed by the sociologist Róisín Ryan-Flood reflected, “It was almost like ... your father and mother’s dead, their issues die with them.” But more strikingly, older, rural voters appear to be reconsidering. Lainey told me recently about being introduced as Rita’s wife by one 70-something woman to another at a family friend’s funeral. Now, Lainey is bringing the marriage question directly to her neighbors’ doors. She’s re-enacting a Marriage Equality advertisement called “Sinéad’s Hand,” which followed a young man traversing Ireland to ask every citizen for permission to marry his girlfriend. Lainey explained to me: “I am asking peoples’ permission to marry Rita. The responses I’m getting are hilarious. People are looking at me as if I have two heads. When I explain that that’s what the referendum is about, that in fact I would have to call to every single voting person in Ireland and ask their permission to marry Rita, it kind of hits home. I haven’t had any bad experiences, and everyone I have asked has said yes.”

The Republic of Ireland is far from a paradise for LGBT people, and even a yes vote on May 22 won’t change that. According to one survey, Ireland was one of the most homophobic Western countries around the turn of the century, as measured in willingness to have gay neighbors. Another survey, in 2006, found that 80 percent of Irish teachers were aware of homophobic verbal bullying among their students. Religious-run institutions are still permitted by law to discriminate in hiring on the basis of gender identity and sexual orientation.

But the brand of gay equality that’s developing in Ireland right now deserves broader attention. It takes the traditional social teaching of the 20th-century Catholic Church, with its emphasis on family ties and community cohesion, and reinterprets it for a 21st century in which many don’t view sex not aimed at reproduction as a sin. Decades of scandal opened up a unique gap between Church authority and Catholic ideals in Ireland, and it was in this space that new interpretations had room to take root. The Irish version of gay rights isn’t a radical queer vision. It upholds, in a way, the central tenet of the 1937 constitution—that the family is the necessary and moral basis of social order. But it insists that the notion of family be expanded to include a much wider range of human experience. In doing so, the Irish gay-rights movement has fashioned a template that, regardless of Friday’s result, may prove highly palatable to other traditionally conservative countries, too.

Perhaps even more strikingly, it has fashioned a version of family values that emphasizes community rather than sin. If Pope Francis’s recent efforts to shift the Vatican’s focus away from homosexuality, abortion, and contraception, and towards the support of families and the alleviation of poverty, echo these Irish trends, I suspect it’s not entirely a coincidence. The Irish gay-marriage movement is a part of a much larger transformation around notions of morality and family. A country that has historically deferred to the Vatican may end up influencing the Vatican itself.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.