Pope Francis faces a struggle this weekend to reinvigorate Ireland's confidence in the Catholic Church, in the face of multiple abuse scandals and a new generation shedding traditional mores.
Once a bastion of Roman Catholicism, Ireland is unrecognisable from the country visited by pope John Paul II almost 40 years ago, when divorce was banned and same-sex marriage unheard of.
The Church's grip on Irish society has weakened and the papal visit on Saturday and Sunday is a moment for Ireland to take stock of the Church's diminished role in national life.
Also unimaginable at the last papal visit to Ireland in 1979: Prime Minister Leo Varadkar, who will meet Pope Francis on Saturday at the start of the visit, is openly gay.
The pope is visiting Ireland for the first time to close the 2018 World Meeting of Families (WMF) -- a global Catholic gathering that takes place every three years.
The pontiff is set to address the catalogue of abuse that has dramatically eroded the Church's authority in Ireland.
Some 14,500 people have applied for compensation under an official scheme for victims of clerical sex abuse set up in 2002.
Diarmuid Martin, the Archbishop of Dublin, said the visit would be marked by anxiety about the Church in Ireland.
"My hope is that Pope Francis will challenge the Church in Ireland to be different... in a culture that is different," the primate of Ireland said in his homily on Sunday.
"The pope has to speak frankly about our past but also about our future. We need a Church with confidence."
- 'Dark chapter of abuse and cover-up' -
The highlight of the pope's visit is a giant mass in Dublin's Phoenix Park on Sunday.
Some 500,000 are expected to attend: a tenth of the population.
Though still a huge crowd, the comparison with John Paul II's visit illustrates how times have changed.
In 1979, 1.5 million saw John Paul II in Phoenix Park, a third of the population at the time and probably the largest-ever gathering in Irish history.
Irish society has very publicly rejected Church teaching in two recent referendums.
In 2015, 62 percent voted in favour of legalising same-sex marriage.
And this year on May 25, 66 percent voted in favour of lifting the constitutional ban on abortion imposed after a referendum in 1983.
These were seen as watershed moments, but for some they confirmed a change in Irish society that had long since taken place.
At an annual national commemoration service on Sunday, Agriculture Minister Michael Creed praised the widening split between Church and state.
"The Church assumed control of social policy with the aid of an acquiescent government and a cowed people," he said.
"This dark chapter of abuse and cover-up has seen a deep rift emerge between many of the faithful and the official Church.
"The steady separation of Church and state in recent times is good for both."
- 'Nope to the Pope' -
The pope will go to Archbishop Martin's pro-Cathedral in Dublin on Saturday and pray in a chapel dedicated to abuse survivors.
The Vatican said Tuesday that Pope Francis would also meet with victims.
The announcement came the day after he condemned the "atrocities" revealed by a far-reaching US report into clerical child sex abuse in Pennsylvania.
"My hope is that he will speak kindly but also speak frankly. The recent history of the Church in Ireland had its moments of real darkness," Martin said.
"It is not enough just to say sorry. Structures that permit or facilitate abuse must be broken down and broken down forever," he said.
Cardinal Pietro Parolin, the Vatican secretary of state, said the Irish Church had "recognised its failures" and had implemented measures to prevent recurrences.
Pope Francis's visit is "a journey of hope, to help the Church in Ireland," he said.
"We can really change and we can build a society in which the children and the vulnerable persons are secure."
The pope will address the WMF at Croke Park, the 82,000-capacity Gaelic games stadium, on Saturday.
On Sunday, he will visit the rural Knock shrine before the Phoenix Park mass.
However, the "Say Nope to the Pope" campaign saw people snap up some of the 500,000 free tickets with no intention of going, as a form of peaceful protest.
They will hold a separate event in the city centre.
The One in Four abuse survivors' support organisation -- which says as many as one in four adults have experienced some form of sexual abuse before the age of 18 -- is attending the alternative gathering.
"The pope's visit is very distressing to many survivors, retriggering old emotions of shame, humiliation, despair and anger," said executive director Maeve Lewis.
"The least they deserve during this papal visit is a clear commitment that the Catholic Church finally intends to deal with clerical child sexual abuse."