ROME — It’s happened. Defying the polls, the Nobel Prize winners, Hollywood stars, and Las Vegas bookmakers, America has elected Donald Trump. And it’s safe to assume that the billionaire will continue to clash with the pope on a series of fronts — especially the wall the president proposes to build along the Mexican border.

“Building walls instead of bridges is not Christian; this is not in the Gospel,” the pope memorably said in February, on the return flight to Rome from Mexico.

Yet even though he has clear moral expectations as to how the people who are wealthy are supposed to use that wealth, the Argentine pontiff is not blindly hostile to the rich and has been known for setting personal and ideological differences aside in favor of the common good.

During eight years he was the Archbishop of Buenos Aires, then Cardinal Jorge Mario Bergoglio had to work side by side with the city’s mayor, Mauricio Macri.

Macri, elected president by Argentines late last year, is a former civil engineer who studied at New York’s Columbia Business School. The son of a prominent Italian businessman in the industrial and construction sectors, Macri was raised in an upper-class home, and would eventually make a fortune of his own.

(There is a vast difference between the dollar values of the Macri and Trump fortunes, but both are very wealthy men).

Despite differing views on many issues, not the least over the market economy, Macri and Bergoglio got along pretty well. And the pope has rejected attempts by many in the Argentine media to paint him as a leading opponent of Macri.

In an interview, he said the two of then got along just fine. “Don’t look for reasons [for conflict],” he said. “There’s no historical motive for saying that I have a problem with Macri.”

“I don’t like conflicts,” Francis said. “I’m tired of repeating this.”

Francis said that he had only one run-in with Macri during the six years the two worked together in Buenos Aires, one as archbishop and the other as mayor.

“Only once in a long time,” he said. “The average is very low.”

He was referring to Argentina’s first gay marriage, in 2009, which took place in Buenos Aires almost a year before the country became the first in Latin America legally to approve same-sex weddings, a move fiercely opposed by Bergoglio.

The couple concerned found a judge in Macri’s city who ruled that Argentina’s civil code was “unconstitutional” because it didn’t allow for same-sex marriage. Bergoglio wrote a strongly-worded letter to Macri when he didn’t strike down the ruling.

The future pope said the union “sets a serious precedent in the legislative history of our country and throughout Latin America.” He later said it was the only time in his 18 years as a bishop that he openly criticized a public official by name.

There were also tensions over abortion but the differences were dealt with behind closed doors.

Abortion might be one issue Trump and Francis don’t clash over. But three key areas Francis singled out in his US Congress speech — immigration, the death penalty and the arms trade — are ones where the new president and the pope seem destined to differ.

Although he predates Francis’s pontificate, the Holy See has also had first-hand experience in dealing with businessmen turned politicians, in the form of former Italian President Silvio Berlusconi, whom many pundits see as a kind of European forerunner of Trump.

The French-born Argentine businessman, Enrique Shaw, whose sainthood cause is favored by Francis, is another example of the pope having no innate bias against wealthy people.

“Enrique Shaw was rich, yet saintly,” Francis said in an interview back in 2015. “A person can have money. God gives it to him so he can administer it well, and this man administered it well. [He did so] not with paternalism, but by fostering the growth of people who needed help.”

Shaw was born in 1921 into a wealthy family. He joined the Navy at a young age and eventually took several positions of leadership in his family’s companies, with the intention of promoting, and putting into practice, the Catholic Church’s social teaching.

He died in 1961 after battling cancer.

As cardinal, Bergoglio asked one of his auxiliary bishops, Mario Poli, to conduct the theological research into Shaw’s sainthood cause. Poli is now the cardinal archbishop of Buenos Aires.

Meanwhile, as pope, Francis has met countless wealthy entrepreneurs and bankers, such as Jean Todt, president of the International Automobile Federation; Mark Zuckerberg, founder of Facebook; Eric Schmidt, Google’s chairman and Christine Legarde, president of the International Monetary Fund.

But of course, he has made the defense of the poor a hallmark of his pontificate.

Time and time again, he’s said that to ignore the poor is to ‘despise God’. In a message he sent to the World Economic Forum in Davos he called for the cry of the poor to “become our own, and together may we break down the barriers of indifference that too often reign supreme and mask our hypocrisy and egoism!”

During his by-now yearly messages to the World Meeting Popular Movements, a collection of non-governmental organizations representing street sellers, fishermen, laborers, farmers, members of the “original peoples” and “cartoneros,” or people who sift through garbage looking for recyclable goods, he has deplored the way ‘scandalous sums’ of money are available to save banks but not people.

Quoting St. Basil of Caesarea, he’s even called the idolatry of money “the devil’s dung.”

But he has been quicker to criticize soulless mechanisms of the market than the people who operate in it.

In his social encyclical Laudato Si’, for example, he says: “Business is a noble vocation, directed to producing wealth and improving our world,” especially if “it sees the creation of jobs as an essential part of its service to the common good.”

Addressing the US Congress, he said business “can be a fruitful source of prosperity for the area in which it operates, especially if it sees the creation of jobs as an essential part of its service to the common good.”

That was also his message to 7,000 members of the Italian Christian Union of Business Executives in 2015, whom he challenged “to cooperate in order to grow an entrepreneurial spirit of subsidiary, to deal with the ethical challenges of the market and, above all the challenge of creating good employment opportunities.”

None of this means that Pope Francis and Donald Trump won’t have plenty to disagree over. But evidence shows that they could still work together.

Trump’s victory speech put aside the divisive rhetoric that has dominated the election campaign to pledge to be president for all Americans, telling his detractors: “I am reaching out to you for your guidance and your help, so that we can work together and unify for the sake of the country.”

The record shows that if Trump attempts to reach out to the leader of the world’s 1.2 billion Catholics, Francis will not hesitate to respond in kind.