The Vatican is now working to a plan which was drawn up in meticulous detail by John Paul II, a full nine years before his death.
Great secrecy surrounds the choosing of a new pope
It sets out the arrangements for his funeral and the subsequent conclave - the secret meeting of cardinals that will be convened later this month to elect his successor.
The 13,000-word document also specifies how the Church is to be governed during the next three to four weeks.
The death of a pope is the signal for cardinals from all over the world to pack their bags and head for Rome.
As "Princes of the Church", their most important function is to elect the pope.
Once in Rome, they will join Vatican-based cardinals in daily meetings to ensure everything proceeds smoothly.
When a pope dies, virtually all the top Vatican officials lose their jobs. It is up to the new pope to decide whether to re-appoint them, or replace them.
The day-to-day business of the Vatican will continue, but the cardinals are not allowed to assume the powers of the pope, or alter any of the rules he put in place before his death.
Given the number of world leaders who will want to attend Friday's funeral, and all the pilgrims heading for Rome, this is a major logistical operation.
Extra security agents have been drafted in to the Vatican City
Security for an event on this scale is a nightmare. Already, 200 security agents are on duty around St Peter's Square, checking pilgrims.
In all, thousands of police and paramedics will be on duty over the coming days.
"We need a lot of people on the ground because we are expecting two million pilgrims," says Pierluigi Tasciotti, director of Rome's emergency services.
A team of 120 volunteers, usually called out for natural disasters, is standing by for the influx.
"This is an emergency too," says volunteer Antonio Morigi. "It is an unpredictable situation, but we are prepared."
John Paul II decreed that the conclave to elect his successor should not begin until at least 15 days have passed since his death. But it cannot be delayed beyond 20 days.
During the period of the Sede Vacante, or Vacant See, the most important Vatican official is the Camerlengo, or Chamberlain.
His first task was to seal the papal apartment and ensure the Pope's ring and lead seal were smashed - a centuries-old precaution against any attempt at forgery or impersonation.
Oath of secrecy
He will supervise the practical arrangements for the conclave. Voting will take place within the Sistine Chapel, but only after electronic sweeps to ensure it has not been bugged.
John Paul II warned there would be "grave penalties" if there was any breach of security.
183 living cardinals, aged from 52 to 95
117 cardinals are under 80 and eligible to vote
114 (97.4%) of the electors were appointed by John Paul II
Even the cardinals have to swear an oath of secrecy - on a bible - to ensure they reveal nothing about the election.
Once the voting begins, they are shut off from the outside world until they reach their decision.
They are forbidden from communicating with anyone by letter or phone, so they will not be able to take mobile phones into the conclave.
They are also banned from watching television, listening to the radio, or receiving newspapers.
And while the rules do not mention the internet, it is safe to assume they will not be able to surf the net or send emails.
In the past, cardinals were allocated makeshift "cells" with uncomfortable beds and chamber pots.
At this conclave, for the first time, the cardinals will enjoy modern hotel-style accommodation within the Vatican.
Each pope has the opportunity to re-write the rules for the election, and John Paul II inserted a clause to end any deadlock.
Initially, a cardinal will require two-thirds of the votes to be elected. But after about 30 ballots, there is an option for deciding the election by a simple majority.
So potentially, it could end up as a straight fight between the two men with the most votes.
Like the Vatican, the media have spent years preparing for this day.
Volunteers will help deal with the expected crowds
Thousands of journalists are now in Rome, and small fortunes have been spent by broadcasters to reserve positions on rooftops with good views of the Vatican.
While John Paul II was still alive, the Vatican tried to discourage speculation about who might fill his shoes. Now the guessing game has begun in earnest.
The secrecy of the voting process, and the fact that no cardinal is allowed to campaign for the papacy, helps to make it one of the world's most unpredictable elections.
In 1978, the cardinals elected Karol Wojtyla, a man little known outside his native Poland.
This conclave of 2005 is wide open. Once again, the world may be startled by the identity of the man who dons the white robes.