The world’s most powerful president and religion’s most visible voice with meet for the first time Wednesday — but not before President Trump has to cross through the Vatican wall that divided the two men, metaphorically, last year.

Long a symbol of the Vatican’s majesty, the wall also became for Mr. Trump evidence of Pope Francis’s hypocrisy, after the pontiff last year, responding to a reporter’s question about the U.S.-Mexico border, said wall-builders are “not Christian.”

Mr. Trump’s famous response was that the pope himself lived behind “an awfully big wall.”

While all sides expect a cordial meeting this week, it’ll be hard to avoid the contrasts between the two figures.

One is a wealthy president whose affluence is legendary, and who is emerging from an extraordinarily divisive campaign. The other is a Jesuit who took a vow of poverty, who moved out of the papal rooms to live with the Vatican’s guesthouse and whose hallmark has been building bridges.

But the two men also share some striking similarities: a penchant for tweeting and an idiosyncratic approach to their respective roles, with each promising massive changes.

“When you think about it, they’re both outsiders and popular in different ways,” said Miguel H. Diaz, former U.S. ambassador to the Holy See and now a professor at Loyola University in Chicago. “The pope didn’t campaign for his position but they’re both elected leaders that have this kind of agenda to reform the institution — [for] the pope, the Roman curia, the president, our government.”

There are some potential areas of cooperation for the two powerful men: The U.S. has been a leader in combating human trafficking, and Mr. Trump has used his administration to promote pro-life issues and religious freedom, and to raise the plight of Christian refugees in the Middle East.

But the areas of dissonance are legion. The pontiff has made combatting global warming a hallmark of his tenure, has sought a better dialogue with Islam, and demanded from the world’s wealthy countries a more welcoming approach to immigrants and refugees.

While Mr. Trump has called for a halt to all Syrian refugee resettlement in the U.S. the Vatican, under the pope’s direction, has taken in a stream of Syrian families.

“What common ground could Trump and Pope Francis find?” wondered the Catholic News Agency, in a piece this week.

‘I will say what I think’

Vatican-watchers said to expect all the usual ceremony for Mr. Trump, with the two men exchanging gifts and then having a talk with perhaps just a few advisers present.

“No matter whether you’re Christian or not Christian, no matter whether you’re a theist or an atheist, when you encounter the pope it’s always a special interaction,” said the Rev. Mark Morozowich, dean of Catholic University’s school of theology and religious studies.

“You have a sense for his holiness, the holiness of the people of God, and you realize what the world is about is a much deeper issue than sort of what money you’re making on a deal,” the priest said.

Mr. Trump said last week that he’s looking forward to his audience with the pope saying they’ll talk about “how Christian teachings can help put the world on a path to justice, freedom, and peace.”

For his part the pontiff told reporters this month he’ll withhold judgment of Mr. Trump until the two men speak in person.

“I will say what I think, he will say what he thinks. But I never, ever, wanted to make a judgment without hearing the person,” the pope said, vowing to approach the U.S. leader with respect.

Mr. Diaz said it’s striking that both men are from the Americas — Pope Francis is the first pontiff from the New World — but from opposite sides of the hemisphere. Where Mr. Trump is a product of American business, the pope is a descendant of Italian immigrants and was steeped in the South American experience, with its suspicion of colonialism from the North.

“The pope is not going to go there in a meeting finger-pointing,” Mr. Diaz said. “But he’s also not going to hold back on his fundamental teaching, which is that the times call for the rejection of human indifference.”

The former ambassador said Mr. Trump would do well to review the pope’s speech to the U.S. Congress in 2015, where the pontiff talked about four heroes — Abraham Lincoln, Martin Luther King Jr., Dorothy Day and Thomas Merton — he said represented the American dream.

On a more concrete level, Mr. Trump could benefit from the pope’s unparalleled information network.

The Holy See maintains envoys in more than 180 countries. Mr. Diaz, said the tradition of seating ambassadors in order of the time of their appointments to the Holy See meant that he was placed between the Cuban and Iranian envoys — two countries that, at the time, the U.S. had no formal relationship with.

Walled off

The two men’s first interaction from afar didn’t go so well.

Flying home from a visit to Mexico in February 2016, the pope was asked about Mr. Trump’s signature demand for a border wall and his get-tough approach to illegal immigration, the pope responded that erecting walls “is not Christian.”

“A person who thinks only about building walls, wherever they may be, and not building bridges, is not Christian. This is not in the gospel,” the pope said — though he declined to say whether voters should accept or reject Mr. Trump.

“I say only that this man is not Christian if he has said things like that. We must see if he said things in that way and in this I give the benefit of the doubt,” the pontiff said.

Mr. Trump, on the campaign trail in South Carolina at the time, immediately fired back, saying he thought the Mexican government had spurred the pope’s criticism.

Later that day Mr. Trump noted that the pope lived behind “an awfully big wall,” and the campaign’s social media director posted a Twitter message with a diagram of the 2-mile-long wall surrounding the Vatican.

The walls are more than a millennium old, having been first constructed in the 9th Century at the direction of Pope Leo IV. He was responding to the threat from Arab armies, which had sacked Rome earlier in the century, said the Rev. Michael Collins, a priest and noted papal historian.

The pope used to control extensive lands throughout central Italy, but thanks to an early 20th century treaty, in which the church and the secular Italian state recognized one another, the Vatican now controls a little more than 100 acres.

After Rome was sacked in 1527, the wall’s height was raised to about 30 feet, Father Collins estimated. That is the same height that the U.S. Homeland Security Department has set as its target for Mr. Trump’s proposed wall on the U.S.-Mexico border.

Father Collins said the Vatican walls are “entirely extraneous” to the ministry of Pope Francis.

“The Argentine pope’s views on migrants are well-known. No other pope has taken such an outspoken stance,” the priest said, pointing to the pope’s first visit trip outside Rome, in 2013, to Lampedusa, an island off the coast of Sicily that’s a transit point for seaborne migrants trying to reach Europe from North Africa.

At that site, Pope Francis called for repentance for the treatment of migrants and criticized the “globalization of indifference.”

Despite opposition from Congress, Mr. Trump remains a firm believer in his wall, telling reporters last week that it’s needed to stem the surge in drug trafficking as well as to lock in gains made in tamping down on illegal immigration.

“Walls work — just ask Israel,” he said, just days before his trip this week that included a stop in the Jewish state.

Mr. Diaz said Pope Francis’s exhortation about walls last year was less about concrete and brick, and more about an approach to the world.

“To me, the pope is hitting a much more profound belief which is the time we’re in now is not a time for walling each other off ideologically,” the former ambassador said. “Do nations have a right to maintain their boundaries, their borders? Of course they do. The question is not that, the question is how to we deal with the challenges in a humanitarian way.”

For now, Mr. Trump will get a first-hand look at a wall that has withstood more than a millennium.

Father Collins said the American Secret Service paid a visit to the Vatican last week for a security sweep of the president’s route.