Pope Francis on Monday publicly broached the prospect of his own death for the first time, giving himself "two or three years" but not ruling out retirement before then.

Talking to reporters on a flight back to the Vatican from South Korea, the 77-year-old pontiff, who seemed in good spirits, was asked about his global popularity, which was evident again during his five-day visit.

"I see it as the generosity of the people of God. I try to think of my sins, my mistakes, not to become proud. Because I know it will last only a short time. Two or three years and then I'll be off to the Father's House," he replied light-heartedly.

The Argentine pope said he could handle the popularity "more naturally" these days, though at first it had "scared me a little".

While the pope has not spoken publicly before about when he might meet his maker, a Vatican source said he had previously told those close to him that he thought he only had a few years left.

Pope Francis also mentioned the possibility of retiring from the Papacy, as his predecessor Benedict XVI did last year, if he felt he could no longer adequately perform his duties.

Resigning the papacy was a possibility "even if it does not appeal to some theologians", he told reporters.

He added that 60 years ago it was practically unheard of for Catholic bishops to retire, but nowadays it was common.

"Benedict XVI opened a door," he said.

Francis admitted that he had "some nerve problems", which required treatment.