One helped revolutionize the church, becoming an enduring icon among progressive Roman Catholics who view religion as a vehicle for justice and peace.
The other figured in a societal revolution outside the church, earning the adulation of conservatives by battling communism and contributing to the downfall of the Soviet Union.
On Sunday, Pope Francis will canonize two pontiffs — John XXIII and John Paul II — in a ceremony here, marking the first time that two popes were made saints at the same time. The late pontiffs were among the most influential popes of the post-World War II era.
As many as a million pilgrims and visitors are expected to descend on the area around St. Peter's Square, where the images of the two popes now stare down from the Vatican facade.
Adherents of both men already were out in force Saturday, though John Paul II, who served for almost 27 years and died in 2005, was clearly the better known, especially among the massive contingent of visitors from his native Poland.
Relatively few seemed to recall much about John XXIII, who served for less than five years and died in 1963, before the accomplishments of his signature initiative, the convening of the Second Vatican Council, helped bring the church into the modern age. Vatican II, as the council is known, introduced vernacular languages into the Holy Mass, among other innovations. Pope Francis, the former Jorge Mario Bergoglio, was a young seminarian in his native Argentina during John's reign and has long been an admirer of the pontiff.
"He was courageous, a good country priest, with a great sense of humor and great holiness," Francis told reporters last summer in reference to John XXIII, the Associated Press reported.
Like the current pope, John was known as a man with a common touch who sought out opinions of average Catholics. Francis recently invited several homeless men to his birthday gathering and regularly telephones average people who write to the Vatican.
Francis, who has proved a canny and skilled manager of the papal message during little more than a year as head of the church, opted for the unprecedented step of dual canonization. He also waived a requirement for a second miracle attributed to John XXIII. The unusual move prompted much discussion among Vatican watchers.
Some observers see Francis as keenly aware of the political minefield surrounding canonization, especially for those candidates whose legacies remain heavily contested. This has led to conjecture that Francis' move was largely an act of reconciliation, aimed at healing deep divisions between Vatican II enthusiasts and those who favor John Paul's more conservative approach to church doctrine. Some view the dual canonization as a means of freeing Francis from the ideological constraints of the two camps.
"Canonizing popes can be politically divisive in the church when it is an attempt by one faction to impose its mode of the papacy on the future by bolstering the legacy of its favorite pope," Thomas Reese wrote in Friday's edition of the National Catholic Reporter. "But Francis' solution is brilliant: Canonize both popes at the same time.… Since the men are so different, it does not canonize either model of being a pope. It leaves him free to follow his own path."
Whether the canonizations will foster greater unity among conservative and progressive strains in the church is not clear. Francis, for all of his popular appeal and admiration for John XXIII, has not shifted from traditional Catholic doctrine on hot-button issues such as contraception, abortion, gay marriage, married priests and ordination of women.
The Vatican confirmed another first Saturday: retired Pope Benedict XVI will assist Francis during the ceremony, creating a singular celebration of four pontiffs, alive and dead.
Benedict, who retired from the papacy last year, has since largely dedicated himself to prayer in a house on the Vatican grounds, according to church officials.
Police were preparing Saturday to erect barriers around St. Peter's Square, leaving it accessible at a few entrances equipped with metal detectors. Some visitors brought sleeping bags and apparently planned to stay overnight near the square.
"The excitement is building by the hour," said a Mexican priest, Father Alfonso Romero, 52, who was bearing an image of the Virgin of Guadalupe, patroness of Mexico and Latin America, as he walked amid the throngs close to the Vatican. "Both of these popes were very beloved."
In honor of John Paul's heritage, many Polish pilgrims hoisted their national flag and held signs emblazoned with the names of their hometowns. Some prayed in unison in Polish as the sun broke through the clouds on a hazy spring afternoon, cooled by a gentle breeze.
"John Paul II meant everything to us: His history is the recent history of Poland," said Aneta Jarzaybeck, 42, a physical therapist from Warsaw.
But as is usually the case in St. Peter's Square, the gathering was international and diverse.
"Pope John Paul II was always my favorite pope: That's why I wanted to come here," said Francis Raji, 36, part of a group of Nigerian pilgrims from Lagos. "He cared about the poor. He had a good impact on the politics of the world."