Pope Leo XIV has called on people to stop “fanning the flames of polarisation” on the first day of a visit to Spain.

The pope, who will be in the country for a week, urged people in a speech on Saturday to turn away from the temptation to garner popularity through divisive rhetoric.

“I invite everyone to set aside the divisive and polarising narratives of your societal reality and history, so as to overcome sterile simplifications through the fruitful appreciation of complexity,” he said.

Pope Leo, the first American to lead the Catholic Church, blamed technology for this divide, saying it exaggerates prejudices and weakens critical thinking.

His remarks come as Spain is facing controversies on issues including immigration and political corruption.

Pope Leo used Spain’s past as an example of peaceful cohabitation between religions and cultures, adding that its history “suggests that a culture of encounter, not confrontation, is what fosters stability and prosperity”.

“In reality, the message of peace, which at present unfortunately strikes some as naïve and others as confrontational, is welcomed by those who do not shut themselves off in preconceived ideologies, but are rather open to the truth,” he said.

Pope Leo’s visit to Spain has been welcomed with excitement by many. Billboards, posters and subway cars have been plastered with his face. Crowds have lined the streets of central Madrid.

The visit coincides with two concerts by Puerto Rican superstar singer Bad Bunny this weekend.

“If they are confronted with the question ‘Do you want to go see Bad Bunny or do you want to go to see the pope?’ I think many will see Bad Bunny,” Leo said.

“But I think there will also be a few here to see the pope. And that says something, you know.”

Pope Leo has been vocal about current issues around the world, including immigration, artificial intelligence and the US-Israeli war on Iran. He has had an ongoing public disagreement with US President Donald Trump.