More than a million people lined the streets of Madrid on Sunday as Pope Leo XIV held an open-air mass in the Spanish capital, the Vatican said.

Crowds descended on the city as the pontiff arrived for the service on the second day of his official visit to the country at the Plaza de Cibeles, with King Felipe VI and Queen Letizia among the congregants.

The pair welcomed the pontiff to the royal palace on Saturday, as he began his trip by praising the Spanish government's opposition to global conflicts and its support for migrants .

The Pope waved as he made his way through the city early on Sunday, where authorities mounted a major security operation for the mass and subsequent procession through central Madrid.

People waved flags and shouted "long live the Pope", with some throwing petals as he arrived at the square.

Large crowds had similarly gathered in the city as he began his trip on Saturday. He was later joined by some 500,000 congregants - most of whom were young people - for a prayer vigil near Real Madrid's Santiago Bernabeu stadium which stretched into the night.

"In the face of the emptiness of indifference and compliance, before the violence of war and lies, you must be the sparks of a new humanity," he told those gathered.

His remarks echoed those he delivered during his royal reception, in which he praised Spain's commitment to peace and its "faithful adherence to international law".

The country's socialist Prime Minister Pedro Sánchez has clashed with US President Donald Trump over the US and Israel's war against Iran, and with Israel over the war in Gaza. The Chicago-born pope has also drawn criticism from the president over his anti-war views.

His trip to Spain - the first by a pope in some 15 years - will also feature an unprecedented address before the Spanish parliament and a meeting with victims of sexual abuse within the Catholic Church.

Pope Leo is also due to visit the Canary Islands with Prime Minister Sánchez later in the week, where they will honour thousands of migrants who have died trying to reach Europe.