Royalty, presidents, prime ministers and a legion of faithful arrived in St. Peter's Square on Saturday to pay their last respects to Pope Francis at a funeral Mass to honour his sometimes turbulent papacy.
Among those attending from more than 150 countries will be US President Donald Trump, who clashed with Francis on numerous occasions over their starkly contrasting positions on immigration.
Thousands of ordinary mourners hurried towards the Vatican at first light. Many camped out to try and secure spots at the front of the crowd for the ceremony.
"We have been waiting all night," said Spanish pilgrim Maria Fierro. "Accompanying (Francis) in his last moments is very emotional."
Mary James, a Franciscan nun, also waited overnight. "I was up the whole night," she said. "We want to say goodbye because he (was a) living saint, very humble and simple."
The Argentine pope died on Monday, aged 88, following a stroke. His death ushered in a meticulously planned period of transition for the 1.4-billion member Roman Catholic Church, marked by ancient ritual, pomp and mourning.
Over the past three days, around 250,000 people filed past his body, which was laid out in an open coffin before the altar of the cavernous, 16th-century St. Peter's Basilica.
His casket will be carried through the main doors on Saturday for the outdoor funeral, which starts at 10 a.m. (0800 GMT). Massed ranks of foreign dignitaries will be at one side of the stone colonnade, facing hundreds of red-hatted cardinals on opposite banks of seats.
Alongside Trump will be the presidents of Argentina, France, Gabon, Germany, Italy, the Philippines, Poland and Ukraine, together with the prime ministers of Britain and New Zealand, and many European royals.
One of the first VIPs to arrive was former US President Joe Biden and his wife Jill.
The Vatican says some 250,000 mourners will fill the vast, cobbled esplanade and main access route to the basilica. The ceremony will be presided over by Cardinal Giovanni Battista Re, a 91-year-old Italian prelate.
"You can feel a lot of energy, yes, a little bit of despair because we are tired, but ultimately we want to come and say 'thank you', thanks to Pope Francis for all he did for his church," said Eduardo Valencia, visiting from Mexico.
The first non-European pope for almost 13 centuries, Francis battled to reshape the Roman Catholic Church during his 12-year reign, siding with the poor and marginalised, while challenging wealthy nations to help migrants and reverse climate change.
"Francis left everyone a wonderful testimony of humanity, of a holy life and of universal fatherhood," said a formal summary of his papacy, written in Latin, and placed next to his body.
Traditionalists pushed back at his efforts to make the Church more transparent, while his pleas for an end to conflict, divisions and rampant capitalism often fell on deaf ears.
BREAK WITH TRADITION
The pope shunned much of the pomp and privilege usually associated with the papacy and will carry that desire for greater simplicity into his funeral, having rewritten the elaborate, book-long funeral rites used previously.
While Pope John Paul II's funeral in 2005 lasted almost three hours, the service on Saturday is due to take 90 minutes.
Francis also opted to forego a centuries-old practice of burying popes in three interlocking caskets made of cypress, lead and oak. Instead, he has been placed in a single, zinc-lined wooden coffin, which was sealed closed overnight.
In a further break with tradition, he will be the first pope to be buried outside the Vatican in more than a century, preferring Rome's Basilica of St. Mary Major, some 5.5 kilometres (3.4 miles) from St. Peter's, as his final resting place.
His tomb has just "Franciscus", his name in Latin, inscribed on the top. A reproduction of the simple, iron-plated cross he used to wear around his neck hangs above the marble slab.
His funeral motorcade will drive him through the city for one last time, allowing Romans to say farewell.
Italy has mounted one of the biggest security operations the country has seen since the funeral of John Paul II. It has closed the airspace over the city and called in extra security forces, with anti-aircraft missiles and patrol boats guarding the event.
As soon as Francis is buried, attention will switch to who might succeed him.
The secretive conclave to elect a successor is unlikely to begin before May 6, and might not start for several days after that, giving cardinals time to hold regular meetings beforehand to sum each other up and assess the state of the Church, beset by financial problems and ideological divisions.