Mikel Oyarzabal opened the scoring after two minutes with a fierce strike from the edge of the area before Pedri doubled the lead after the half-hour mark, tapping into an empty net following a cross from Ferran Torres.
Spain added a third early in the second half when Yeremy Pino's delivery forced an error from goalkeeper Pedro Gallese, before Jairo Velez pulled one back for Peru with a low finish.
World Cup fever was evident around the stadium, where Spain shirts dominated the stands alongside Barcelona jerseys, reflecting the club's strong representation in Luis de la Fuente's squad.
Peru supporters were outnumbered but remained vocal throughout the evening.

Pedri, Rodri and Ferran Torres drew some of the loudest cheers as fans broke into chants and performed Mexican waves around the stadium.
World Cup merchandise stalls lined the streets outside, while heavy security protocols did little to dampen the festive atmosphere.
The tournament kicks off on Thursday.
Check out the match stats here.
The 2026 World Cup will be held from June 11th to July 19th in the United States, Canada and Mexico. The tournament will feature 48 national teams and will be played in 16 modern stadiums.
Match schedule and times | Group tables | Full squads for World Cup | How to watch the World Cup
