ROME —  U.S. Democratic presidential candidate Bernie Sanders met privately with Pope Francis on Saturday, the capstone to an unusual detour from the American election.

Sanders said the meeting was for personal reasons and does not constitute an endorsement from the Holy See.

"I am an enormous fan of the pope because I think he has played a transformative role in the world in talking about issues that very rarely get the kind of discussion they deserve," Sanders said in an interview aboard his chartered plane. "Whether it is income and wealth inequality, whether it is what he calls the dispossessed, the young people, the old people, the unemployed people who are on the sidelines of society, whether it is the ideology of greed, whether it is need to transform our energy system away from fossil fuel to save the planet, he has been a transformative leader.

"And he is a very beautiful man," Sanders continued. "When you meet him, you see something very, very special in his face. He is a man of peace, and you see that."

Some of Sanders's advisers, including his wife, Jane, also were at the meeting. He said that there was no discussion of his underdog candidacy or the election. There was no photograph of the brief meeting at the papal residence complex, in keeping with Vatican protocol and also, Sanders said, "to make clear that there is no endorsement here."

Francis, on Saturday, made it clear that his meeting with Sanders was not political, saying that those who thought it was should “look for a psychiatrist,” according to Reuters.

The pontiff met Sanders at the Vatican guest house, where the pope lives. “When I came down, I greeted him, I shook his hand and nothing more. This is called good manners and it is not getting involved in politics,” Reuters says the pope told reporters, during an answer to a question aboard the plane returning from the Greek island of Lesbos, where he visited a refugee camp.

“If anyone thinks that greeting someone is getting involved in politics, I recommend that he look for a psychiatrist,” he reportedly said while laughing.

Sanders was at the Vatican, participating in a seminar on income inequality and economic justice at the Pontifical Academy of Social Sciences, where he was invited to attend as well as speak. He and other conference invitees spent the night at the Vatican after the conference.

The trip suggests that Sanders is looking ahead to how he would continue and expand the focus on very liberal social justice issues that has defined his candidacy. In a matter of months he moved from gadfly to serious challenger to the longtime Democratic favorite, largely on the strength of a set of ideas more common to liberal university campuses than the political debate stage.

"If elected president I certainly would look forward to working with the pope in trying to create a moral economy, which was the theme of this conference; an economy which challenges the idea that greed has got to be the dominant force in the world's economy," Sanders said.

And if he loses?

"Well, the ideas and the efforts remain the same. I'm a United States senator from Vermont. And I'll continue to fight the fights that I've always fought," with a larger platform to do so, Sanders said.

The Vatican invitation is symbolic of that platform, he agreed. But Sanders and the pontiff share many goals for social justice and economic restructuring, and Sanders suggested that, and not his candidacy, was the reason for the audience with Francis.

"The speech that I gave yesterday would have been the speech 10 years ago, long before I ever dreamed of running for president," he said in an interview with The Washington Post.

Sanders said the trip was "absolutely" a worthwhile diversion from campaigning in New York, where he trails front-runner Hillary Clinton by double digits in most polls.

"Look, we have campaigned extraordinarily hard in New York," Sanders said. He claimed he has addressed 96,000 people across the state at rallies and other meetings. "We have worked very hard and when we go back, we're gonna work hard. This was an invitation that I would never have forgiven myself if I had refused."

Sanders needs a solid showing in New York, which offers more than 200 delegates, to maintain a plausible argument that he can catch up to Clinton. His path to the nomination has grown narrower even as he has defeated Clinton in a string of contests over the past month.

"Uh, we got a shot," Sanders said when asked about his prospects for Tuesday's primary vote. "It's gonna be tough for us, not just because Clinton has won two elections there, but because of the nature of the voting rules."

New York, which Clinton represented as a senator for eight years, allows only registered Democrats to vote in the Democratic primary, meaning independents are cut out. Sanders has been regularly defeating Clinton among independents. The state also does not allow same-day registration. Sanders said he disagrees with both rules.

"Those are the rules. They don't work for us," Sanders said. "But nonetheless, if there is a large voter turnout, we got a shot to win this."

Sanders flew to Rome on a large, chartered airliner, largely paid with campaign funds, spokesman Michael Briggs said.

He said he did not know the exact cost of the trip. News organizations flying with Sanders pay for their passage, and the Secret Service also pays a share.

Sanders has taken some criticism earlier in his campaign for using chartered aircraft — a luxury for the privileged class as well as an addition to carbon emissions — while railing against the excesses of the wealthiest top 1 percent of Americans.

Several of Sanders’s advisers, along with his wife, their four children and four of their grandchildren, accompanied him for the overnight visit to Rome. While Jane Sanders attended the conference with her husband and joined him in meeting the pope, the rest of the family spent time sightseeing. The trip also included a stay at a posh hotel.

Sanders was back on the plane Saturday, as he plans to campaign in Brooklyn in the evening.

Stefano Pitrelli in Rome contributed to this report.