VATICAN CITY - Pope Francis on Sunday proclaimed John Paul II and John XXIII as the Catholic Church’s newest saints at a ceremony joined by hundreds of thousands of pilgrims for the two pontiffs who helped shape 20th century history.

“We declare and define as saints the blessed John XXIII and John Paul II,” the Catholic leader said in a Latin prayer, as pilgrims and foreign dignitaries massed in St Peter’s Square applauded and chanted: “Amen!”

In his homily, Francis praised them as “men of courage” who worked “in renewing and updating the Church”. “They were priests, bishops and popes of the 20th century. They lived through the tragic events of that century but they were not overwhelmed by them. “For them, God was more powerful,” he said.

Pope emeritus Benedict XVI, 87, who last year became the first pontiff to step down since the Middle Ages, made a rare public appearance in his white papal cassock and Francis embraced him before the ceremony. Francis was co-celebrating the mass with Benedict XVI and hundreds of bishops and cardinals - the first time that two living popes said mass together. It was also the first time that two Catholic Church leaders were being declared saints on the same day.

Commentators defined the event as a “four-pope day” and the Vatican said 800,000 people followed the event in Rome, including 500,000 in and around St Peter’s Square. Many faithful waved the red-and-white flags from John Paul II’s native Poland and some wore Polish folk costumes while one pilgrim held a banner reading: “Two pope saints in heaven, two in St Peter’s Square”.

“We are followers of all four popes who have all been close to the people. This is an historic day but one that you really feel inside,” said Luisa Tomolo, an Italian revelling in the festival atmosphere.

Thousands watched the ceremony on giant screens set up in picturesque spots of Rome, witnessing an unprecedented event seen as a way of uniting conservative and reformist wings of Catholicism. John Paul II was hugely popular but was also a divisive figure who alienated many leftist Catholics during his 27-year reign and has been criticised for turning a blind eye to revelations of child sex crimes by priests.

His support for Marcial Maciel, the Mexican founder of the Legion of Christ movement who was revealed to be a serial sexual predator, was particularly controversial.

The charismatic globe-trotting John Paul helped topple Communism in Eastern Europe and John XXIII or “Good Pope John” is best remembered for launching a process of reform of the Catholic Church in the 1960s.

Former German chancellor Helmut Kohl paid tribute to John Paul II in an editorial for Il Messaggero.

“He played a decisive role in making the fall of the Berlin Wall possible,” Kohl said, describing him as “a fearless fighter for freedom”.

John XXIII helped bring to an end official Catholic prejudice against Jews and has been credited for his pacifying role during the Cold War, including in defusing tensions during the 1962 Cuban Missile Crisis.

The two new saints “played an indelible role for the development of peoples and peace”, Francis said.

By sainting them together, Francis was appealing to “rival camps within the Catholic fold who see John XXIII and John Paul II as their heroes”, said US-based Vatican expert John Allen from the Boston Globe.

Francis has said his predecessor, who lives a life of quiet prayer in a former monastery inside the Vatican “is not a statue in a museum, he is an institution”.

The Vatican said 98 foreign delegations were present including former Polish president and Solidarity leader Lech Walesa - an ally of John Paul II.

The kings of Belgium and Spain also attended, with Queen Sofia of Spain wearing a white dress - a dress code for the queens of mainly Catholic countries.

Zimbabwean President Robert Mugabe was also in attendance, despite a ban from entering the European Union. The interdiction does not apply in the Vatican City, the smallest sovereign state in the world.

Ukrainian Prime Minister Arseniy Yatsenyuk had been due to come but was forced to cut short his trip after an audience with Pope Francis on Saturday because of the spiralling tensions at home.

Among the attendees was also Floribeth Mora, the Costa Rican woman whose apparent healing from a brain aneurysm has been declared the second supposed miracle in John Paul II’s name required for sainthood status.

The Polish pope (1978-2005) became a media superstar and survived an assassination attempt by Turkish extremist Mehmet Ali Agca in St Peter’s Square in 1981.

His sainthood was sped up and comes just nine years after his death - the fastest canonisation since the 18th century when the current rules were adopted.

Francis also accelerated Italian John XXIII’s candidacy, granting it with only one supposed miracle to his name.