Pope Francis and President Trump have made peace — with each other, at least.

The pair, who clashed sharply during the presidential campaign, set aside their differences for a meeting Wednesday at the Vatican, where they exchanged gifts and discussed the need for peace in the wake of Monday night’s terror attack in England.

“Honor of a lifetime to meet His Holiness Pope Francis. I leave the Vatican more determined than ever to pursue PEACE in our world,” Trump tweeted after their first face-to-face sit-down, one of the few times he has taken to Twitter during his first overseas trip as president.

Trump appeared stiff at the beginning of the get-together with his verbal sparring partner.

But once the duo emerged from their 30-minute discussion, the commander in chief had visibly relaxed and was effusive in his praise for the Catholic leader.

“Thank you, thank you. I won’t forget what you said,” Trump told the pope, although it wasn’t immediately clear what he was referring to, as reporters weren’t allowed in the meeting.

One of the issues they discussed was the global threat of terrorist groups such as ISIS, said Secretary of State Rex Tillerson.

They had “pretty extensive conversations around extreme terrorist threats and extremism, radicalization of young people. That’s one of the reasons the meeting went long. They got into quite a good conversation about it,” Tillerson said aboard Air Force One as the president and his entourage jetted toward Brussels for the next leg of his nine-day trip.

After the meeting, the pope handed Trump a small olive tree.

“It is my desire that you become an olive tree to construct peace,” Francis, who was born and raised in Argentina, said in Spanish.

“We can use peace,” Trump replied.

Francis also gave Trump a signed copy of his 2017 message entitled “Nonviolence — A Style of Politics for Peace” and a copy of his 2015 encyclical letter on the need to protect the world from the effects of climate change.

“Well, I’ll be reading them,” said the president, who has called global warming a plot by the Chinese to undermine American manufacturing.

In return, Trump handed the pope a boxed set of first-edition books by civil-rights leader Martin Luther King Jr. and an engraved stone from the King memorial in Washington, DC.

Tillerson said Pietro Cardinal Parolin, the Vatican’s secretary of state, encouraged Trump keep the United States to remain in the Paris climate agreement, adding they had a “good exchange.”

The president hasn’t made a decision yet on the matter, Tillerson said.

Trump and the pope also talked about immigration, an issue that led to their contentious relationship during the presidential campaign, with the pontiff striking out against the president’s pledge to build a wall on the Mexican border.

Francis at the time said that Trump should be thinking of creating a bridge, not a barrier, and called people who believed in walls “not Christian.” Trump called the pope’s comments “disgraceful.”

“Migration has come up because of the real challenge that Italy, in particular, faces with migration out of North Africa,” Tillerson said.

A Vatican statement said Wednesday’s meeting was “cordial” and expressed a hope for “serene collaboration” between the church and the US government, including “assistance to immigrants.”

Later during a meeting with Italian Prime Minister Paolo Gentiloni, Trump said, “It was an honor to be with the pope.”

Then, in Trumpian fashion, he added, “He is something.”

With Wire Services