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.”

Several of Sanders’s advisers, including his wife, Jane, also attended the meeting. He said there was no discussion of his underdog candidacy or the American 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.”

Sanders was already at the Vatican, participating in a seminar on income inequality and economic justice at the Pontifical Academy of Sciences, where he was invited to attend as well as speak. The trip suggests 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 the Washington Post interview.

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 last month.

Stefani Pitrelli in Rome contributed to this report.