Pope John Paul II's last will and testament indicates that he considered resigning in 2000, when he reached 80.
The Vatican released the 15-page document on Thursday, after it had been translated from the Pope's native Polish into Italian.
The will thanks other faiths, as well as scientists, artists and politicians, for their support throughout his life.
The document was written over John Paul II's 26-year pontificate. Its release comes a day before his funeral.
Writing in 2000 - when he was already ailing and the Church was embarking on a new millennium - John Paul II suggested the time was one of torment for him.
The Pope said he hoped the Lord "would help me to recognise how long I must continue this service".
He prayed that he would have the "necessary strength" to continue his mission.
The entry mentions the 1981 attempt on his life and calls his survival a "miracle".
The BBC's Peter Gould in Rome says the disclosure that John Paul II considered resigning comes as a considerable surprise.
During his long illness he always gave the impression that the papacy was a mission given to him by God, and only God could decide when it should end.
However the fact that he considered standing down in 2000 in significant, our correspondent adds.
The queue of mourners stretched back nearly 2km (1.2 miles).
He was 80 - the age beyond which cardinals are no longer allowed to elect a new pope.
The testament also says the pontiff left no material possessions and asked that his notes should be burned.
As Vatican officials made the document public, they said the Pope had considered being buried in Poland, but finally decided to leave the decision up to the College of Cardinals.
A huge security operation is under way, in preparation of Friday's funeral.
Strict controls have been introduced in Rome's airspace, and thousands of extra army and police have been deployed.
The event will be attended by about 200 political and religious leaders from around the world.
Among those attending will be US President George W Bush, UK Prime Minister Tony Blair, French President Jacques Chirac and Brazilian President Luiz Inacio Lula da Silva, who leads the world's largest Catholic country.
FUNERAL GUESTS INCLUDE:
UN Secretary General Kofi Annan
US President George W Bush
UK Prime Minister Tony Blair
Iranian President Mohammad Khatami
Brazilian President Luiz Inacio Lula da Silva
Palestinian Prime Minister Ahmed Qurei
French President Jacques Chirac
Taiwanese President Chen Shui-bian
Zimbabwean President Robert Mugabe
Iranian President Mohammad Khatami and Palestinian Prime Minister Ahmed Qurei - both of them Muslims - are also taking part.
Mr Bush and two of his predecessors, George Bush Senior and Bill Clinton, have already paid their respects at St Peter's Basilica, where the Pope's body is lying in state.
They were allowed past the estimated one million people waiting to enter the basilica.
The sheer number of mourners is said to have doubled Rome's normal population, stretching the city's resources to the limit.
Hundreds of thousands of Poles are among those still on their way.
A total of 117 cardinals are eligible to take part in the secret conclave, scheduled to begin on 18 April, to elect a new pope.