Pope Francis on Tuesday said he thinks about the time he might be called to step down from his role as bishop, citing the example of St. Paul leaving Ephesus.

Speaking during his homily at the morning Mass in the Domus Sanctae Marthae, the Vatican guesthouse which serves as the papal residence, Francis said all bishops should seek the “grace to be able to take our leave and step down” if this is the will of the Holy Spirit.

The pope was speaking about the scriptural passage where Paul leaves the Church in Ephesus to go to Jerusalem.

“It’s a decisive move, a move that reaches the heart, it’s also a move that shows us the pathway for every bishop when it’s time to take his leave and step down,” Francis said, according to Vatican News, which did not provide a full transcript of his remarks.

Francis said Paul felt “compelled by the Holy Spirit” to go to Jerusalem.

He lauded “this experience by the bishop, the bishop who can discern the Spirit, who can discern when it is the Spirit of God speaking to him and who knows how to defend himself when spoken to by the spirit of the world.”

The pontiff said the apostle’s great love “is Jesus Christ. His second love is for his flock. Take care of each other and of the entire flock. Keep watch over the flock: you are bishops for your flock, to take care of it and not in order to advance your ecclesiastical career.”

Francis noted that Paul entrusted the elders of the Church of Ephesus to God, knowing the Lord will take care of them.

“When I read this, I think about myself…because I am a bishop and I must take my leave and step down,” Francis said.

“I am thinking of all bishops. May the Lord grant all of us the grace to be able to take our leave and step down in this way (like Paul), with that spirit, with that strength, with that love for Jesus Christ and this faith in the Holy Spirit,” the pope said.

Francis’s predecessor, Benedict XVI, was the first pope to resign in over 700 years when he stepped down in 2013.

In 2014, Francis called Benedict’s resignation a “beautiful gesture of nobility, of humility and courage,” adding it “cleared a path for later popes to do the same.”

He also said Benedict’s resignation “should not be considered an exception, but an institution.”

In 2015, he said there should not be “leaders for life” in the Church, saying this only happens in dictatorships.