In less than three months Ireland will vote on whether to allow marriage equality – and opinion polls suggest that the once staunchly Catholic nation may be ready to vote yes.

But that result is not guaranteed; even now, a fifth of people remain undecided about marriage equality. The battle for “middle Ireland” is on.

This makes it even more remarkable that – in stark contrast to Australia or the United States – every one of Ireland’s major political parties has come out in favour of a yes vote in the referendum.

So how has Ireland got to the brink of allowing marriage equality? And what are the lessons for marriage equality supporters elsewhere, including in Australia?

What the referendum is about

The referendum will be held on May 22, with the result announced the following day – conveniently the day of the Eurovision, fondly nicknamed by some as the “Gay Christmas”.

Last month, the Irish government released the wording that people will be voting yes or no to, which is:

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

The referendum follows on from Ireland’s introduction of civil partnerships in January 2011. Campaigners for civil marriage have argued that there are 160 statutory differences between civil partnership and marriage, mainly in the areas of taxation, children and adoption.

The most pressing of those issues involves adoption rights for same-sex couples. This will be addressed separately in the Children and Family Relationships Bill, which was published mid-February.

The case for and against

Even though the referendum is not about parental rights, the debate about it has so far largely focused on children and defending the traditional view of marriage.

The Iona Institute for religion and society, a socially conservative Catholic advocacy group, has outlined its argument for sticking with “man-woman marriage” only, “for the sake of the children”.

Alliance for the Family and Marriage

Another group, known as the Alliance for the Family and Marriage, has been criticised for handing out leaflets with unsubstantiated claims about “active homosexual persons” contracting cancer, dying 20 years sooner than average and abusing their own children.

Of course, in all good referendum campaigns the alternative viewpoint has to be made available. In Ireland, the Broadcasting Authority of Ireland requires that there is a balance of viewpoints.

So along with the case for the no vote, Irish voters have been watching videos like this one, which argues against the points made in the Iona Institute video.

Wooing middle Ireland

Both sides of the debate agree that the referendum will be won by whoever does the best job of convincing “middle Ireland”.

All the major political parties – Fine Gael, Labour, Fianna Fáil and Sinn Féin – are campaigning for a yes vote.

This is a remarkable shift, particularly for the Fine Gael and Fianna Fáil parties, which have historically been more conservative on social issues.

Enda Kenny, the Taoiseach (prime minister) and leader of the Fine Gael party, had previously insisted he did not want to be “pressurised on marriage equality”.

But Kenny has since talked about his own “personal journey” and is now campaigning strongly for a yes vote, declaring last month: “I think it is time to do this so it’s a people’s choice.”

Kenny became the first Taoiseach to visit a gay bar in December 2014, attending his party’s lesbian, gay, bisexual and trans group’s Christmas celebration, the significance of which cannot be overlooked.

Added to this journey has been the coming out of current and former members of parliament. Most notable of these has been Health Minister Leo Varadkar, who is touted as a future leader of the Fine Gael party.

Last weekend, the majority governing party Fine Gael held its annual conference in rural Ireland. Speaking on February 21, the Taoiseach delivered a clear message on the referendum, declaring:

A yes vote would send out a powerful signal internationally that Ireland has evolved into a fair, compassionate and tolerant nation.

What about Australia?

The shift in Irish politics is in sharp contrast to the situation in Australia.

In June 2014, Australian Marriage Equality commissioned Crosby Textor – the main research firm used by the Liberal Party over many years – to survey 1000 Australians on their views about marriage equality.

Crosby Textor’s polling showed support for marriage equality had reached a new high of 72% of those surveyed. The survey also found majority support in every demographic, including people of faith, people in regional and rural areas and older people.

Crosby Textor polling, commissioned by Australian Marriage Equality

A renewed push to allow same-sex marriage in Australia began this month, with a phone campaign targeting federal MPs. But deep divisions remain on both sides of the parliament.

Beyond the well-known difference of opinion between Australian Prime Minister Tony Abbott (in favour of the status quo) and his colleague Malcolm Turnbull (in favour of change), National Party MPs have reportedly said they would require a “written guarantee” that Turnbull wouldn’t pursue same-sex marriage if he topples Abbott as Liberal leader.

Late last year, Labor leader Bill Shorten declared to the Australian Christian Lobby’s national conference that “I believe in God and I believe in marriage equality”.

But not everyone in Labor shares Shorten’s view. Last year it emerged that Western Australian Labor senator Joe Bullock had attacked his ALP running-mate Louise Pratt as a “poster child” for causes such as gay marriage at a dinner organised by a Christian society. He also said he’d be willing to be expelled from Labor rather than vote for same-sex marriage.

This issue is not going to go away in Australia. Liberal Democratic Party senator David Leyonhjelm is pushing for a conscience vote, arguing “it’s not the government’s business to be telling people who they can and can’t marry”. Leyonhjelm said earlier this month that he may block government legislation until a free vote is granted, ideally before the May budget.

That means Ireland is not the only country counting down to a May deadline.

Polls show the level of support for equal marriage rights in Ireland and Australia is remarkably similar: 71% in Ireland and 72% in Australia.

What middle Ireland and middle Australia say about this issue is not so different after all. Instead, the key difference between the countries is that in Australia politicians supposedly elected to represent the will of the people are choosing not to listen.