"We're at around four million. They have reached Rome and visited the area of the Vatican or immediately around there," Rome chief Marcello Fulvi said on Thursday.
Giant screens were being set up across the city to allow pilgrims who cannot get to St Peter's Basilica for the funeral Mass. Vehicle traffic was banned and schools were to shut down to ease congestion as Rome dealt with an unprecedented influx of people.
Pilgrims anxious to get a glimpse of the pope's body waited patiently in line, hoping to make it in time before authorities shut down St Peter's before his funeral.
Newly arrived Poles, waving red-and-white flags, massed around the Vatican.
An estimated two million were making their journey from John Paul's native country to pay tribute to the man credited with helping to end communism in Poland and unite Europe.
Pilgrims are anxious to get a
last glimpse of the Pope
Authorities reopened the line after a few hours' break overnight to help clear the huge crowd.
"We thought we would find a lot of people here and could not get to the basilica," Mikhal Szylar, a 19-year-old student who arrived on a bus from Poland, said.
"We hope we'll be able to see the pope in a few hours."
Authorities had closed the line on Wednesday night, anticipating a wait of over 24 hours for many pilgrims. They also closed the basilica for a few hours overnight for cleaning.
On Thursday morning, they reopened the doors at around 4.20am (0220 GMT), about 40 minutes before schedule. The line also was reopened shortly afterwards, but many who had waited hours had already given up and left.
"Contrary to what we expected, this morning the line had been cleared," Massimiliano Benedetti, a police officer at the scene, said.
Officials said Thursday morning's line was moving more quickly, with the wait dramatically shortened to just a few hours. But it was still a long wait for just a few seconds to see the body.
"We're a little angry because we can't get in. We would like to at least get into St Peter's to pray"
A piligrim from south Italy
"They let you see him only for three seconds, and it is too short a time compared to how long we've been waiting," Saraj Ortega, a 17-year-old from Vitoria, Spain, who had been in the line for about 10 hours, said.
The basilica was expected to close at 10pm (2000 GMT) on Thursday to prepare the square for Friday morning's funeral drawing world leaders from 100 countries and millions of ordinary faithful.
As the line was temporarily closed overnight, disappointed pilgrims stood before barricades blocking them from the line, chanting "Open, Open," and pleading with police officers to let them join the queue.
When the barricades were erected, thousands of people gathered behind them, refusing to leave. Frustrated, they pressed close to the metal barriers. Most were young, many with heavy packs on their backs.
"We're a little angry because we can't get in. We would like to at least get into St Peter's to pray. It doesn't matter if we don't manage to see the pope," Rossana Zampelli, 25, who came from a town in southern Italy, said.
"He's my spiritual father," seminarian Antile Alain, 50, from Guadeloupe, who spent two days travelling to Rome, said.
Seminarians from many nations
have travelled to Vatican City
"I find it abnormal to come from so far away and not be able to see the pope."
Billy Mulhall came from Ireland to see the Pope but was held back by police.
"I got here last night, and I thought I'd come over to St Peter's square this morning," the 67-year-old said. "I guess it's too late now."
He wiped away his tears. "This morning I pray to the Blessed Mother for the Pope."