Playing host to one of the largest Western religious gatherings of modern times, the Vatican closed the doors to St. Peter's Basilica and authorities ramped up security ahead of Friday's funeral for Pope John Paul II (search).

Rome officials, on guard against both terrorism and unruly crowds, planned to lock down the city. Thursday night, vehicles were banned from the city center. Air space was closed and anti-aircraft batteries outside town were on alert. Naval ships patrolled both the Mediterranean coast and the Tiber River near the Vatican, while NATO (search) surveillance aircraft flew high overhead.

Free live streaming video of the pope's funeral at 4 a.m. EDT on FOXNews.com.

Political power brokers, royalty and throngs of faithful planned to attend the funeral. The U.S. delegation — including President Bush and wife Laura, former President Bill Clinton and former President George H.W. Bush — was to be joined Friday by Prince Charles, U.N. Secretary-General Kofi Annan (search) and representatives of more than 80 countries.

Jewish and Muslim religious leaders will attend the funeral, along with Israel's foreign minister and the head of the Arab League.

On Thursday, hordes of pilgrims — the hardiest of some 4 million who flooded Rome — were rewarded for holding out after police closed off the line Wednesday night waiting to view John Paul's body in St. Peter's Basilica (search). In the morning, the barriers were lifted for more mourners as the numbers who said a personal farewell approached 2 million since the body went on public view Monday. The basilica's towering bronze doors were closed late Thursday.

Pilgrims staked out positions with sleeping bags and blankets just outside St. Peter's Square, getting as close they could to the scene of the funeral — even though they will see little more than the same images on giant television screens as could be seen elsewhere in the city.

Rome groaned under the weight of visitors. Side streets were clogged in a permanent pedestrian rush hour, mostly by kids with backpacks. Tent camps sprang up to take the spillover from hotels. Hawkers jacked up prices of everything from bottled water to papal trinkets.

"You really have to love the pope to be willing to do this," said Nathanael Valdenaire, a young Frenchman who slept on the pavement in a sleeping bag alongside his sisters.

Pope's Testament Released

John Paul suggested in his last testament that he considered the possibility of resigning in 2000, when the Roman Catholic Church began its new millennium and he turned 80, according to his testament released Thursday.

The document also said he had left no material property and asked that all his personal notes be burned. It mentioned only two living people: his personal secretary and the chief rabbi of Rome who welcomed him to Rome's synagogue in 1986.

The Polish-born pope, who died Saturday at the age of 84, also had considered the possibility of a funeral in Poland, but later left it up to the College of Cardinals to decide. The pope will be buried under St. Peter's Basilica on Friday after a funeral in the square.

Writing in 2000, the pope, who suffered from Parkinson's disease and crippling hip and knee ailments, suggested the time was one of apparent torment for him, mentioning the 1981 attempt on his life. He called his survival a "miracle."

He said he hoped the Lord "would help me to recognize how long I must continue this service to which he called me the day of 16 October, 1978."

He also prayed at the time that he would have the "necessary strength" to continue his mission as long as he was serving as pope.

As they planned the transition from John Paul's eventful 26-year reign, the College of Cardinals set April 18 as the start of its conclave to elect a successor, a papal election with new rules and new technologies.

With 3,500 accredited journalists watching, the 116 cardinals expected to chose the next pope will be mindful of the warning in a document by John Paul to abide by their vow of secrecy — or face "grave penalties according to the judgment of the future pope."

Vatican spokesman Joaquin Navarro-Valls said the cardinals would celebrate a morning Mass on April 18, then be sequestered in the Sistine Chapel in the early afternoon for their first secret ballot.

Italian news services reported Thursday that 140 of the 184 cardinals were in Rome Thursday afternoon, local time. Father Raniero Cantalamessa of Italy and Cardinal Tomas Spidlik of the Czech Republic have been chosen as the ones to lead the cardinals' meditations on electing a pope. Spidlik will lead the Mass before the conclave.

In past conclaves, the so-called "princes of the church" were locked in the Apostolic Palace, crammed into tiny makeshift cubicles without running water and limited toilet facilities.

John Paul, in a 1996 change, said the cardinals would be housed in a hotel within the Vatican walls that he had built. Each cardinal now has a private room and bath.

Also unlike previous conclaves, the electors would be free to roam the Vatican, though they are forbidden from communicating with anyone outside. The Sistine Chapel and other areas will be swept for any electronic listening devices.

According to church law, prelates are expected to hold at least one ballot on the first day of a conclave. If no one gets the required two-thirds majority after about 12 days, cardinals may change procedure and elect the pope by simple majority.

Indonesian Cardinal Julius Darmaatmadja, the archbishop of Jakarta, said Thursday he hoped the College of Cardinals would keep John Paul's legacy in mind when they enter the conclave.

"We hope that the man they appointed will be more or less like him," he told reporters as he entered the Vatican for Thursday's pre-conclave meetings.

John Paul's spiritual document did not name the mystery cardinal he created in 2003, Navarro-Valls said. John Paul created the "in pectore" or "in the heart" cardinal in his last consistory. The formula is used when the pope wants to name a cardinal from a country where the church is oppressed.

The number of cardinal electors under age 80 and thus eligible to vote is 117. On Wednesday, the Philippines Embassy to the Holy See said Cardinal Jaime Sin, 76, was too ill to attend. However, on Thursday, Sin's office in Manila said the cardinal was hoping to attend despite his poor health.

The Associated Press contributed to this report.