Sanders will attend a conference on social, economic and environmental issues.

Democratic presidential candidate Bernie Sanders said he has accepted an invitation from the Vatican to attend and speak at a conference on social, economic and environmental issues just days before the New York primary on April 15.

And in the process he sparked a diplomatic controversy over Vatican protocol.

"I am very excited to have received an invitation from the Vatican to participate in a major conference dealing with how we inject morality into the world's economy," Sanders told reporters Friday morning.

When asked if he will personally meet with Pope Francis, Sanders said it was not yet clear.

"It is something that I very much would like to do," Sanders said. "The Pope’s schedule is determined by the Vatican. I would certainly be enthusiastic about that. I think there is a possibility, but that has not been scheduled.”

Sanders said he would be giving a speech at the Vatican conference next Friday, April 15, and will return to the U.S. on Saturday.

An hour or two later, Bloomberg News reported that Sanders had touched off a diplomatic row, with one Vatican official telling the business service that the Vermont senator had essentially invited himself to the conference, in the process showing "monumental discourtesy."

“Sanders made the first move, for the obvious reasons,” the president of the conference's host, Margaret Archer of the Pontifical Academy of Social Sciences, told Bloomberg. “I think in a sense he may be going for the Catholic vote, but this is not the Catholic vote, and he should remember that and act accordingly.”

A senior Vatican source, however, told Fox News that Monsignor Marcelo Sánchez Sorondo, not Pope Francis, invited Sanders to the conference, but no one-on-one meeting between Sanders and the pope is foreseen at this time.

The source also told Fox News that the Vatican is eager to stay out of the U.S. presidential campaign, especially with many Catholics expressing unease on social media that the pro-choice Sanders will be speaking at the Vatican.

"Is that going to thrill us? No," the Vatican source told Fox News. But the source added that the pope meets with many different politicians, and it's possible that Sanders will meet with Francis in a larger group.

The New York primary takes place on Tuesday April 19, but when Sanders was asked if his visit to the Vatican just days before the primary meant he was feeling confident about the election, Sanders said, "[It] simply means that this is an invitation from the Vatican, from a pope that I have enormous respect for on the need to have morality in our economy. We cannot simply be worshippers of greed and money. We have got to create an economy that works for all people and not just the few."

Sanders said he greatly admires the pontiff, who, like Sanders, has spoken out against inequality and the threat of global warming.

"Pope Francis in my mind has been an extraordinary leader in making the world conscious of the levels of income and wealth inequality that exist on our planet," Sanders said. "Obviously, he's also been a leader on climate change and making a point that, from a moral perspective, it is absolutely imperative that we leave this planet in a way that is healthy and habitable for future generations."