An engineer, the man said he preferred to keep his prayers private and asked that only his first name, Wojciech, be used. But he was excited to talk about his beloved pope.

“Whenever I have a problem in my life, I come here to pray,” Wojciech said.

In a nation increasingly divided, one figure can still inspire solidarity among Poles: The man born Karol Jozef Wojtyla, who, in 1978, became John Paul II, the first non-Italian pontiff in 455 years.

The nation’s favorite son, he still looms large in Polish life more than 40 years after he was named Bishop of Rome.

From a towering 45-foot-tall statue depicting the pope with outstretched hands that overlooks the city of Czestochowa, to the relics distributed to churches throughout the country — including drops of his blood in more than 100 parishes — Poland is awash in tributes to the man commonly referred to as “Our Pope.”

But at a moment when the country finds itself torn by political conflicts that are cast by all sides as an existential battle for the nation’s soul, the legacy of John Paul II — a champion for both Poland and an integrated Europe — is the subject of dispute.

“For everyone, he remains a positive point of reference,” said Michal Luczewski, the program director for the Center on the Thought of John Paul II in Warsaw. “But there is a struggle over his legacy, with each side wanting to claim him as their own.”

For those on the political right, the pope is an inspiration in their battle against an increasingly secular Europe, Mr. Luczewski said.

Conservative voters, including many supporters of the governing Law and Justice party, believe they are carrying on the pope’s mission, particularly the fight against abortion — an issue that continues to be deeply divisive in this country with the most restrictive reproductive laws in Europe.

“The newest members of the democratic family, John Paul II hoped, ought to be a reminder to the older members of the family that freedom and truth, freedom and virtue, cannot be separated without doing serious damage to the democratic project,” George Weigel, the author of “Witness to Hope,” a biography of John Paul II, said in a recent speech in Warsaw.

“I cannot imagine that John Paul II would be entirely happy with the condition of the world’s democracies, both old and new, today,” Mr. Weigel added.

In the Poland of 2019, even the pope’s childhood can have a contested meaning: While it was suffused in Polish patriotism, it occurred in a place of pluralism.

In a story familiar to every Pole, the pope came into the world just as Poland’s status as a newly free nation was in dire jeopardy, with the Russian Red Army advancing across the country during the summer of 1920.

It was only saved, against all odds, by Marshal Jozef Pilsudski, who mounted a brilliant defense of Warsaw referred to as “The Miracle on the Vistula.”

“I believe Karol was given the name Jozef in a tribute to Pilsudski,” said the Rev. Jacek Pietruszka, the director of the Holy Father John Paul II Family Home in the ancient town of Wadowice, where the future pope was born in a modest apartment. His birthplace is now visited by some 250,000 people annually, nearly 80 percent of them Polish.

The tour of his childhood home begins in a room dedicated to the history of the town and of its Jewish community, which then made up nearly 20 percent of the population.

“Fundamental to the Polish spirit,” the pope wrote in “Memory and Identity,” his final book, which published in 2005, the year of he died, “is multiplicity and pluralism, not limitation and closure.” He remembered “a Republic embracing many nations, many cultures, many religions.”

Visitors can look out of the future pope’s bedroom window at the clock on the wall of the local church, with it’s famous inscription: “Time flies, eternity awaits.” It is a short walk to his former school, the hallways still lined with pictures of his papal visits. All across town, shops sell the puff pastries so beloved by the pope they are now known as Papieska Kremowka, or “Papal” cream cake.

As uneventful as was his youth in Wadowice, his young adulthood was transformed by the cataclysm of World War II. Poland’s loss during the war is hard to fathom, with six million killed, including three million Jews.

John Paul, who moved to Krakow in 1938 to study acting, spent the majority of the war there as a laborer while he attended a seminary school in secret. He was ordained a priest in 1946 and named archbishop of Krakow in 1964.

In the postwar Communist years, party apparatchiks in Poland tried to control the church, and the pope’s opposition to Communism would be one signature of his papacy.

When John Paul first returned to Poland as pope in 1979, one million people turned out in Warsaw’s Victory Square to hear his call for solidarity.

“Be not afraid,” he told the crowds.

Months later, a labor movement in a shipyard in Gdansk planted the seeds for a nonviolent revolution that would lead to the end of Communist rule one decade later.

But in the years that followed, John Paul lamented the growing secularism in Western Europe and feared what would come from democracies unmoored from a moral foundation.

The Rev. Jakub Gil, a former student of the pope, said many in conservative circles in Poland share John Paul’s concerns, and feel as if their faith is under siege from outside forces.

“The threat comes from the West, and it is one that ridicules Polish identity,” said Father Gil, standing outside the Basilica of the Presentation of the Blessed Virgin Mary in Wadowice, where John Paul was baptized.

The idea of “tolerance” espoused by leaders in Brussels, he said, castigates those who speak out against homosexuality or abortion as narrow-minded.

“They treat Poles like children,” he said.

But in a Europe where nationalist forces are pushing back against Brussels and threatening to splinter the bloc, the pope can impart “important lessons about patriotism for today,” Mr. Weigel, the pope’s biographer, said in his speech in Warsaw.

The pope’s patriotism, Mr. Weigel said, “was not chauvinistic or xenophobic. It was not closed in on itself, but open to those who were ‘other,’ ”

“Poland, sometimes betrayed and too often ignored by the West, was,” he insisted, “woven into the tapestry of Europe.”

Beata Borowka, who was tending flowers outside St. Stanislaus Kostka Church in Warsaw, said the pope was saddened even in his lifetime to witness the fading of the solidarity that had helped the country win its freedom.

“Poland today is once again divided,” she said. “It seems that history teaches us that history teaches us nothing.”