MADRID (AP) — Pope Leo XIV urged Spaniards on Saturday to stop "fanning the flames of polarization" as he arrived in Spain at a moment of political turmoil for the Socialist-led government and a credibility crisis for the Catholic Church.

The American pontiff traveled to Spain dozens of times as a priest, but this is the first visit here by a pope in 15 years. And Spaniards turned out in droves to welcome Leo, with an estimated 500,000 people — many of them young — cheering "This is the youth of the pope" at a raucous evening prayer vigil in Plaza de Lima in Madrid, where Leo was treated to a rock star's welcome.

Leo's visit signals a return of papal attention to Europe's Christian roots after Pope Francis largely stayed away from the traditional centers of Christianity in favor of smaller Catholic communities farther away.

WATCH: Pope Leo warns AI should be 'disarmed' in manifesto on potential dangers

Leo is seemingly keen to bring his message of peace, unity and human dignity to a continent sorely polarized over migration, the Russia-Ukraine war and anxiety over artificial intelligence.