Image copyright Getty Images Image caption Mr Sanders said he admired Pope Francis for his views on income inequality and greed

Democratic presidential hopeful Bernie Sanders has accepted an invitation to the Vatican.

Mr Sanders, who is Jewish, accepted an invitation to Rome for a conference at the end of next week.

The Vatican visit is four days before the primary contest in New York, a competitive battle between him and front-runner Hillary Clinton.

Mr Sanders said he was not sure whether he would meet the Pope but he was a big fan of the pontiff.

The Vermont senator said they share the same views on inequality.

"He's trying to inject this sense of morality into how we do economics... and we need that absolutely desperately."

He will attend a conference on social, economic and environmental issues and give a speech on 15 April, his campaign said.

Image copyright AFP Image caption Pope Francis said the Church should be more compassionate to 'imperfect' Catholics

Mr Sanders and Pope Francis have similar views on fighting income inequality, he said, and he was "very moved" by the invitation from the Vatican.

He said he and the Pope disagreed on women's rights and gay rights, but Pope Francis has "injected a moral consequence into the economy".

The senator from Vermont is trailing Mrs Clinton but gaining momentum after a string of wins, most recently in the Wisconsin primary.

In the last few days, a mostly civil fight between the two became more personal as Mr Sanders accused his rival of not being "qualified" to be president.

Pope Francis said on Friday that the Catholic Church should be less strict and show more compassion to "imperfect" Catholics.

He called on the Church to be welcoming to gay Catholics but did not change the Church's views on LGBT families and marriage.

Update 8 July 2016: This story has been amended to clarify that, although he did meet the Pope, Bernie Sanders was invited by the Vatican and not the Pope himself.