Pedro Rodriguez's goal was enough to give World champions Spain a 1-0 win over Italy in their final game before coach Vicente del Bosque names his squad to defend their title later this year in Brazil.
Atletico Madrid striker Diego Costa was handed his debut on home soil at the Vicente Calderon Stadium in what was a rematch of the Euro 2012 final which saw Spain successfully defend their title.
However, Costa failed to make much of an impression and it was Spain's top goalscorer in qualification, Pedro, who made the difference when his shot squirmed under Gianluigi Buffon just after the hour mark.
Spain will play two more friendly matches against Bolivia and El Salvador after the end of the club season before they kick-off their World Cup campaign for real against the team they beat in the 2010 final the Netherlands on June 13.
Costa was the lone frontman as Del Bosque also gave Javi Martinez, Thiago Alcantara and Cesar Azpilicueta a chance to make their claim to be included in his World Cup squad.
Italy also named an experimental line-up as veteran playmaker Andrea Pirlo was left on the bench, whilst Gabriel Paletta was handed his debut.
Spain started the brighter and could have been in front after just 80 seconds when a characteristic burst forward from left-back by Jordi Alba forced Buffon into a brave save.
It was the visitors who nearly went ahead in fortunate circumstances moments later, though, as Alessio Cerci's attempted cross came back off the inside of the post and into the grateful arms of Iker Casillas.
Buffon was then tested by long-range shots from Pedro and Andres Iniesta, whilst Cesc Fabregas wastefully blasted over Azpilicueta's clever cut-back.
Italy posed another warning on the half hour mark when Pablo Osvaldo made space for himself on the edge of the area before curling the ball just over the bar.
Both sides made three changes at the break as David Silva, Xabi Alonso and Victor Valdes came on for the hosts, whilst Pirlo was introduced alongside Ignazio Abate and Mattia de Sciglio by Cesare Prandelli.
It was Silva who nearly had an immediate impact as his through ball released Thiago, but the Bayern Munich midfielder was denied by a stunning save from Buffon.
Silva then fired wide when he should have hit the target when well-placed just outside the area on his favoured left foot.
The Manchester City midfielder was involved again when Spain did eventually make the breakthrough on 63 minutes as after a lovely one-two between him and Iniesta, the ball fell kindly for Pedro and his low effort squeezed in despite Buffon's best efforts.
Costa's final chance for a debut goal came and went 10 minutes from time when his shot flashed across goal.