DUBLIN — On Thursday morning, just two days before Pope Francis was set to arrive in Ireland, the Rev. James Martin, an American Jesuit priest, spoke before a standing-room-only crowd at the Vatican-sponsored World Meeting of Families.

If the title of this talk — "Showing Welcome and Respect in Our Parishes for ‘LGBT’ People and Their Families" — was a surprise to some, the Vatican's decision to invite Martin to deliver it was not.

Since at least 1997, Martin, 57, an author and editor, has advocated for LGBT people in his writings for America magazine, a widely read American Catholic publication, where he is editor at large. He has received significant attention in the last year and a half since publishing his most recent book, "Building a Bridge: How the Catholic Church and the LGBT Community Can Enter Into a Relationship of Respect, Compassion, and Sensitivity."

In the book, Martin calls for improved dialogue between the Roman Catholic Church and LGBT Catholics, a stance that has earned him their appreciation but also drawn the opprobrium of conservative Catholics who adhere to the church's teaching that homosexual acts are “intrinsically disordered” and “contrary to the natural law.”

Some have organized online campaigns to oppose and discredit Martin and others who work to make the church a more welcoming place for LGBT people.

It’s one reason that the Vatican’s invitation to Martin to speak in Ireland — which was a stronghold of conservative Catholicism for decades but in 2015 became the first country to legalize gay marriage by popular vote — was seen as significant among the country's LGBT Catholics, who, along with their families and allies, are hopeful that Pope Francis will take steps to welcome them into the church, and that the church will soften the language in its catechism.

The Rev. James Martin addressed the World Meeting of Families in Dublin on Thursday, Aug. 23, 2018. Fergus Tuohy / NBC

Building a bridge

Martin said part of what motivated him to write "Building a Bridge" was his shock over the June 2016 massacre of 49 people at Pulse, a gay nightclub in Orlando, Florida. The day after the shooting, Martin posted a video to Facebook calling on Catholics to "stand not only with the people of Orlando but also with their LGBT brothers and sisters."

Though he saw a national outpouring of support for the LGBT community, he wrote in the book that he was concerned by "what I did not hear."

"Although many church leaders expressed both sorrow and horror," he wrote, "only a handful of the more than 250 Catholic bishops used the words gay or LGBT.”

Before it was published, the book was approved by his Jesuit superior, the Rev. John Cecero, and it has since resonated not only with LGBT Catholics, but with their families as well.

At an appearance at St. Cecilia’s Church in Boston, Martin received a three-minute standing ovation.

“My granddaughter is not disordered,” one woman told him after a talk at Fairfield University.

But Martin has also become the target of criticism on social media and from conservative lay Catholic organizations, such as the American Society for the Defense of Tradition, Family and Property (TFP), and like minded media outlets, such as LifeSiteNews.com.

In September 2017, his invitation to speak at Theological College, the seminary at Catholic University in Washington was rescinded after a forceful campaign by some traditionalists. In February, TFP garnered some 12,700 signatures on a petition that led a New Jersey parish to cancel a talk Martin was scheduled to give on Jesus.

After Martin’s Dublin talk was announced, the Irish branch of TFP, the Irish Society for Christian Civilization (ISCC), started an online petition to urge Dublin’s archbishop, Diarmuid Martin (no relation), to disinvite Martin from the conference.

The Rev. James Martin used slides of LGBT Catholics during his presentation at the World Meeting of Families in Dublin on Aug. 23, 2018. Fergus Tuohy / NBC

Many Catholic theologians, clerics and lay people have opposed the tactics employed by these traditionalist organizations as incompatible with church teaching.

“I want to say, in no uncertain terms, that this group of people is standing in stark contrast to the Catechism of the Catholic Church, which precisely states that all in the church must welcome and respect the LGBT community,” Daniel Cosacchi, a postdoctoral fellow and lecturer on religious studies at Fairfield, said in an email. “Therefore, Father Martin continues to cement himself as a faithful Catholic who is spreading the message of love and inclusion to an even wider community."

The Rev. Joe McDonald, a parish priest who often appears on Irish national television, said the reaction of some Catholics to Martin is "in fact a frightened, defensive response."

"It is reactionary. It lacks reflection. It is homophobic. It lacks compassion," he said in an email. "Worse than all this it adds insult to injury and exacerbates the pain felt by the LGBT Community and their families.”

McDonald said he does not think anybody is in any doubt about the church’s teaching on homosexuality.

“It could not be clearer," he said. "However, taking that as read, we need to be equally clear that homophobia is sinful. We as a church have been and continue to be homophobic. We need as followers of Jesus of Nazareth to do better than to label our lovely young, or not so young, people as ‘evil’ or ‘disordered.’”

In his talk on Thursday, Martin pointed out that homophobia causes immense harm; LGBT people have much higher suicide rates, are subject to violent hate crimes and, depending on where they live, can be thrown in jail or even executed.

He said many LGBT youth are homeless because their families have rejected them for religious reasons. "So parishes need to be aware of the consequences of stigmatizing LGBT people," he said.

“Think about it this way: by not welcoming, and by excluding, LGBT Catholics, the church is falling short of its call to be God’s family,” he said. “By excluding LGBT people, you are breaking up God’s family; you are tearing apart the Body of Christ.”

What does the future hold?

On LGBT issues, Pope Francis, who is making the first papal visit to Ireland this weekend since John John Paul II came in 1979, has been different than his predecessors. In 2013, he said, “Who am I to judge?” when asked about gay priests, and this year, “LGBT” was reportedly used for the first time in official Vatican documents, in regards to a youth summit scheduled for October.

“What kind of teaching there will be in the future, we don’t know yet and it will take at least a generation to figure that out,” Massimo Faggioli, a professor of historical theology at Villanova University, said in an email. “What we know is that the Church acknowledges the need and urgency to send a signal about the fact that not only straight Catholics are members of the Catholic Church.”

After his talk, Martin sat at a table surrounded by copies of his books and by flags, books and trinkets commemorating Francis’ visit to Ireland. Scores of people lined up to have Martin sign copies of his books and pose for pictures; many told him how much they appreciate his ministry.

Among these was Pearson Chareka, 28, who traveled from Zimbabwe for the conference.

“We know if someone is doing the right thing, by the resistance of people,” Chareka said. “We are going to see the fruits of his work in the near future. He is building a bridge, but the river he is trying to cross is a really big river.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM