WASHINGTON — During the rambunctious U.S. presidential campaign, Pope Francis joined the fray, saying that Donald Trump’s pledge to build a border wall was “not Christian.” Trump fired back, calling the pope’s remarks “disgraceful.”

Now Trump is president, and as he and Francis prepare to meet for the first time in Rome on Wednesday, the two seem as far apart as ever — on immigration, refugees, caring for the poor and climate change. But one thing unites them: a propensity for sending shock waves through the normally staid, tradition-bound institutions they lead.

“They are both populist outsiders. They are both gregarious. They are both loose cannons,” said Andrew Chesnut, a professor of Catholic studies at Virginia Commonwealth University.

But if both Francis and Trump are unconventional iconoclasts, they come to that place from very different perspectives and backgrounds and with diametrically opposed agendas.

Francis is shaking up church conventions to renew Catholics’ emphasis on helping the poor and disenfranchised; to pull priests from their safe sanctuaries and push them into the streets and slums of their communities; to spread a benevolent and inclusive faith. He is a voice of moral authority.

Trump shook political conventions to get himself elected and, in the words of one of his top advisers, nationalist provocateur Steve Bannon, to blow up the administrative state. The president seems to like to flout norms for the sake of showmanship and publicity. He is often inconsistent, even contradictory: His new budget proposal is decidedly not populist; it would slash taxes for the wealthy and cut programs that benefit working-class and low-income Americans.

“Pope Francis really is a true populist and has gravitated closer and closer to liberation theology, adopting this preference for the poor,” Chesnut said. “Whereas Trump really is a populist in terms of rhetoric, but as we see his policies actually unfolding they favor the financial and corporate elites.”

In terms of their outlook and interests, the two “could not be further apart,” said James Martin, a Jesuit priest and editor at large of America, a national Catholic magazine.

“You are taking a New York real estate mogul who has made his mark by conspicuous consumption with an Argentine Jesuit priest who has spent his life serving the poor,” said Martin, who is also an adviser to the communications office at the Vatican.

Francis advocates open-arms policies for immigrants and refugees. Trump sought a travel ban on people from countries, mostly Muslim, that produce many refugees, and he is pressing ahead with the wall Francis condemned, to keep out immigrants from Mexico and Central America.

Francis has made confronting climate change a priority. Trump once called climate change a “hoax,” and his administration is undoing a raft of Obama-era environmental regulations intended to alleviate global warming.

Trump plans to discuss religious freedom and ways to combat religious persecution and human trafficking, national security adviser H.R. McMaster told reporters before the trip.

The pope frequently decries violence against Christians.

Trump has blamed Islamic terrorists for the killing of Christians and says the threat must be battled militarily as well as through intelligence and cyberwarfare. In the United States, Trump sees the threat to religious freedom in laws that force businesses to serve gay and lesbian clients.

“Of course the administration’s idea of religious freedom is quite different from the Vatican’s view of religious freedom,” Martin said. “The Vatican is dealing with people who are being killed for being Catholic, which is different from what is going on in the United States.”

brian.bennett@latimes.com