By Laura Smith-Spark, Delia Gallagher and Ben Wedeman
ROME (CNN) -- John XXIII and John Paul II were canonized Sunday by Pope Francis in an unprecedented ceremony witnessed by huge crowds gathered in St. Peter's Square, Vatican City.
Millions more around the world watched as the two former pontiffs were installed as saints.
The faithful and the curious had packed the streets of Rome around the Vatican before dawn, hoping to catch a glimpse of church history in the making.
The Vatican said it expected 1 million people to gather in St. Peter's Square for the first dual canonization of former popes, followed by a Mass. Giant screens were also set up nearby to allow those who didn't make it into the square to follow proceedings.
In another first, two living popes were present for the ceremony.
Pope Emeritus Benedict XVI, who resigned from the papacy a year ago citing health reasons, was invited by Pope Francis but was not at the altar.
Many of those gathered in the square for the solemn open-air ceremony carried flags and banners. The red and white Polish flag was prominent among them, a reflection of the affection felt for John Paul II in his homeland, Poland.
A holy relic for each of the popes was also formally presented to the altar before the crowds. Giant banners showing the faces of the two late popes have also been hung on the facade of St. Peter's Basilica.
In his homily, Francis described the pair as "men of courage" who bore witness to God's mercy.
"They were priests, bishops and popes of the 20th century," he said. "They lived through the tragic events of that century, but they were not overwhelmed by them. For them, God was more powerful, faith was more powerful."
He also paid tribute to the efforts of John XXIII and John Paul II to renew and strengthen the church.
The landmark Second Vatican Council called by John XXIII was of great service to the Church, he said. That council helped to bring the Church to the people, for example by allowing languages other than Latin to be used for Mass.
John Paul II, who served for nearly 27 years, is seen as the "pope of the family" and wanted to be remembered that way, Francis added.
After the Eucharistic service, their names will be included for the first time in the chanting of the litany of the saints.
Applause greets Benedict
Vatican spokesman Father Federico Lombardi said beforehand that as many as 150 cardinals and 1,000 bishops would attend the canonization ceremony, as well as some 6,000 priests.
Benedict, looking frail in his white robes, was greeted with applause as he took his place among the bishops and cardinals, and was embraced by Francis as he arrived to lead the ceremony.
Delegations from more than 100 countries around the world were expected to be present, the Vatican said, including at least 24 heads of state. A large Jewish delegation was also to attend, reflecting the efforts of both popes to reach out to the Jewish faith.
Sunday evening also marks the beginning of Holocaust Remembrance Day.
John XXIII (1881-1963) -- known as Angelo Giuseppe Roncalli before he became Pope -- was one of 13 children born into a family of Italian peasants, farmers from a tiny village in the country's north, before being sent away to study for the priesthood at age 11.
John Paul II (1920-2005), born Karol Jozef Wojtyla, was brought up in a grimy industrial town in Poland and raised by his soldier father after his mother died when he was just 8 years old. He spent his formative years living under first Nazis, then Communists.
His beatification is the quickest in modern times, made possible because Benedict -- who succeeded John Paul in 2005 -- waived the normal five-year waiting period after death to get someone's beatification rolling.
Vatican observers see the decision to canonize both popes together as a masterstroke designed to invite unity within the Roman Catholic Church, since it brings together a conservative and a reformer.
The day chosen for the ceremony, the first Sunday after Easter, is significant because in the church calendar it is Divine Mercy Sunday. Mercy was a theme important to both popes -- and to Francis.
After the Mass, the Basilica of St. Peter will be open into the evening to allow pilgrims the opportunity to visit the tombs of the two new saints, Vatican Radio said.
John Paul II's relic, a vial containing his blood, is the same one used for his beatification ceremony in 2011. John XXIII's relic is a piece of skin removed from his body when it was exhumed -- in order to move his body from the crypt under St Peter's Basilica to the main Basilica -- for his 2000 beatification ceremony.
The huge crowds reflect the fact that both men were popular in life and known for their efforts to reach out to ordinary people, a path which Francis also seems determined to follow.
The event is the biggest in Vatican City since the election of Pope Francis last year.
The Vatican's official website said civil security forces were prepared and the subway system would run nonstop through the weekend to accommodate the influx of pilgrims for the ceremony.
CNN's Ben Wedeman and Delia Gallagher reported from Rome and Laura Smith-Spark wrote and reported in London. CNN's Ralph Ellis contributed to this report.
™ & © 2014 Cable News Network, Inc., a Time Warner Company. All rights reserved.