Pope Francis has publicly broached the prospect of his own death for the first time, light-heartedly 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.

The Argentinian 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 he had "some nerve problems", which required treatment. "Must treat them well, these nerves, give them mate [an Argentinian stimulant tea] every day," he joked.

"One of these neuroses is that I'm too much of a homebody," he added, recalling that the last time he had taken a holiday outside his native Argentina was "with the Jesuit community in 1975".