The president and the pope have a complicated past.

U.S. President Donald Trump met with the leader of the Roman Catholic Church Pope Francis at a meeting at the Vatican Wednesday morning.

The pair discussed healthcare, education, and immigration, according to a statement from the Vatican. Trump described their meeting as “fantastic” and said of the pope: “He is something,” The New York Times reported.

The meeting was part of Trump’s first international diplomatic trip as president: He traveled to Saudi Arabia and Israel before heading to Europe for a NATO summit.

The president and the pope have something of a complicated past. During the 2016 presidential election, Pope Francis had been critical of the then-candidate's stance on immigration and in particular of his plans to build a border wall with Mexico.

“A person who only thinks about building walls — wherever they may be — and not building bridges, is not Christian,” Francis told reporters in February 2016, in a comment that appeared aimed at Trump.

“If and when the Vatican is attacked by ISIS, which as everyone knows is ISIS’ ultimate trophy, I can promise you that the pope would have only wished and prayed that Donald Trump would have been president,” Trump said at the time.

Despite their differences on issues such as immigration and climate change, the pope said he remained open-minded ahead of his meeting with the president.

“There are always doors that are not closed. We need to find the doors that are at least partly open, go in, and talk about things we have in common and go forward, step by step,” he told reporters earlier this month, according to Reuters.