Pope Francis briefly met Democratic Presidential candidate Senator Bernie Sanders this morning at the Pope’s Santa Martha residence, the Vatican has confirmed.

The courtesy meeting took place at breakfast, around 6am, shortly before the Pope left for his one-day visit to the Greek island of Lesbos. Sanders was also staying at the residence after delivering a ten minute talk at a conference at the Pontifical Academy of Social Sciences yesterday.

"Today certainly was the highlight of the trip," Sanders told NBC News. He said he told the Pope he was “incredibly appreciative of the incredible role that he is playing in this planet in discussing issues about the need for an economy based on morality, not greed."

According to the economist Jeffrey Sachs, who has also been attending the conference which ends today, the courtesy visit was prearranged. “Last night the meeting was scheduled for 6am this morning,” Sachs said in comments to CNA. “They had the chance to talk for several minutes.” No photographs were taken of the encounter.

He said the senator “thanked Pope Francis for his leadership on the moral economy and his leadership on climate change and he described how the Pope's leadership on climate change has made a vast difference in accelerating action on climate change.” He also expressed his gratitude to Pope Francis “for all of his moral leadership and his brave stances.”

Pope Francis “thanked the senator formally for coming to the Vatican and for participating in the meeting at the Academy,” Sachs recounted, adding that the Pope explained that an earlier start than expected this morning meant he couldn’t greet the conference participants last night as has had been originally planned. “He thanked the senator for understanding and appreciated that he had come and participated,” Sachs said. “The senator wished him well on today's journey and the Pope wished Senator Sanders and his wife very well and then the meeting concluded and the Pope left for Greece.”

Sachs said he believed that because the Pope couldn’t meet the conference participants last night, the Vatican “wanted to find a way to thank the senator for coming and to have this meeting, so in the evening the senator was told that it would be the meeting this morning.”

The Pope had an official meeting with Bolivian President Evo Morales yesterday, and is believed to have also met Ecuador’s President Rafael Correa this morning. Both leaders were also attending the conference at the Pontifical Academy, held to mark the 25th anniversary of Pope St. John Paul II’s encyclical Centesimus Annus.

Sanders’ presence at the meeting was highly controversial, coming just four days before the crucial New York primary in which he is campaigning against Hillary Clinton for the Democratic nomination. He spoke at the conference at the invitation of Argentine Bishop Marcelo Sanchez Sorondo, chancellor of the Pontifical Academy of Sciences, a non-official body of the Holy See located in the Vatican.

It is unprecedented for a Vatican-related body, and a pope in modern history, to grant a political figure running for office such exposure in the middle of an election campaign.

Although today's meeting was just a courtesy, some have seen it as a virtual papal endorsement of the presidential bid of a U.S. Presidential candidate who, although his environmental and economic outlook are similar to the Pope's, favors removing all restrictions on abortion and other policies the Church strongly opposes.

It also contrasts with the Pope’s meeting last September with Kim Davis, the county clerk from Kentucky, who defied a U.S. federal court order that she issue same-sex marriage licenses. The Vatican was especially wary of that incident being seen as the Pope injecting himself in U.S. politics. 

But referring to the meeting in a press conference with journalists on the papal plane from Lesbos this afternoon, the Pope said Sanders knew that he was leaving for Greece, and "had the kindness to greet me."

"All the members of the conference, except the heads of state, were guests in Santa Marta," he added. "A greeting is good manners and not about meddling in politics. Whoever thinks it is needs a psychiatrist. "

This article has been updated.