Spain held their nerve to edge past Italy on penalties and book a final showdown against Brazil in the FIFA Confederations Cup.
The world champions were given a stern examination in Fortaleza on Thursday but they stood up to the test and extended their record-breaking unbeaten run in all competitions to 29 matches.
Both sides had chances to win the tie in normal time and in the 30 minutes of extra time that followed but it came down to spot-kicks and after six successful attempts each, it was Leonardo Bonucci who blinked first and substitute Jesus Navas capitalised to plunder the winning penalty.
In a game that saw the two sides meet for the first time since Spain won 4-0 in the final of Euro 2012, Vicente del Bosque kept faith with the competition's top scorer Fernando Torres up front.
Italy, however, were forced into a change in attack due to an injury suffered by Mario Balotelli, with the Milan striker having flown home with a thigh injury. Alberto Gilardino was the man to replace him.
Manager Cesare Prandelli was able to call on the services of midfielder Andrea Pirlo, who missed the 4-2 defeat to Brazil after suffering a calf injury.
Italy started much the brighter and had the first chance of the match, with Christian Maggio heading narrowly over from a corner after seven minutes. The full-back then forced the first save of the game from Iker Casillas following a quick break shortly after.
The pressure continued as Daniele De Rossi glanced a header just wide from a Pirlo cross, but Del Bosque's men soon began to show some composure and calm the game down.
Still it was the Italians who should have led heading into the break as Maggio directed a close-range header straight at Casillas 10 minutes before the interval.
The game slowed down in the second half, with the first effort coming after 57 minutes when Navas forced a good save from Gianluigi Buffon.
Gerard Pique spurned a good opportunity to break the deadlock late on as he fired a shot over the bar, before good link-up play between Torres and Navas saw the new Manchester City signing sting the palms of Buffon with a powerful strike.
Spain continued to pile on the pressure right into stoppage time at the end of the second half but to no avail.
It took until the third minute of extra time for the best chance of the match arrive as Italy substitute Sebastian Giovinco crashed an effort off the post with Casillas stranded.
With both Torres and Gilardino now substituted, both sides were playing without a recognised striker and the goal drought continued, although Juan Mata went close with a curling effort in the second half of extra time.
Xavi Hernandez saw his long-range effort hit the post in the closing stages and penalties beckoned.
The first 12 efforts were textbook examples of how to keep your cool under pressure but after Sergio Busquets had cancelled out Riccardo Montolivo's assured strike to make it 6-6, Bonucci ballooned his effort well over the bar and Navas stepped up to fire a low effort into the corner and seal victory for the Spaniards.
Spain will play Brazil in the final on Sunday, while Italy will meet Uruguay in the third-place play-off on the same day.
|Coach: Del Bosque|
for David Silva 53'
for Pedro 79'
for Fernando Torres 94'
|Drogba revels in ´special night´, dedicates hat-trick to family|
|MLS Review: Hat-tricks for Drogba and Giovinco as stars shine|
|Whelan backs Liverpool for top-four finish|
|Pellegrini still waiting for right offer|
|Ronaldo deserves to win Ballon d´Or - Vazquez|
|Phelan wants Hull job|
|Alaba saddened by Gotze exit|
|Morgan: Vardy right to re-sign|
|Maradona ´hurting´ as Higuain closes on Juventus move|
|Moyes watches Sunderland win, Ibe opens account in six-goal Bournemouth thriller|
|Messi cuts short holiday for Barcelona training camp|
|Ranieri still confident of keeping Mahrez|
|Toure to complete Celtic move on Sunday, says Rodgers|
|Vietto sends Simeone a reminder amid Barcelona links|
|Celtic 1 Leicester City 1 (5-6 on penalties): Mahrez magic the highlight as Ranieri´s side triumph i|
|Ribery, Alaba on target in Bayern win|
|Neymar hails Micale ahead of Olympic tilt|
|Ronaldo wants Real Madrid renewal|
|Ochoa joins Granada from Malaga|
|Heidel quashes Meyer to Liverpool as ´nonsense´|
|Scholes challenges Allardyce to change England mentality|
|Tenerife star Crosas investigated for killing endangered shark|
|De Gea: Manchester United can win title under Mourinho|
|Marseille replace Batshuayi with brother Leya Iseka|
|Cristiano Ronaldo: Best season of my career|
|Scholes: Pogba is not worth £100million|
|Gotze has not forgotten how to play football - Riedle|
|Delph learning more than ever under Guardiola|
|Jovetic ´not worried´ about Juventus|
|Allardyce wants Euro 2016 woes to fire his England|
|Giggs not in a rush to take manager´s job|
|Lopetegui: If not for Spain I would be Wolves boss|
|Shaw one of best left-backs in world - Herrera|
|Injured Sanchez to miss Arsenal tour|
|Melbourne Victory 1 Juventus 1 (Melbourne win 4-3 on pens): Thomas inspires Victory as Juve pay pena|
|Janssen: Ajax and PSV were never going to pay as much as Tottenham|
|Bayern to make Munich shooting tributes|
|Wenger wishes luck to old foe Allardyce|
|United defender Varela joins Frankfurt on loan|
|Sunderland appoint Moyes as Allardyce replacement|
|Javi Martinez devastated by Munich shootings|
|Rooney: I´m desperate to play for Mourinho, just like under Ferguson|
|Godin: Champions League the dream, but LaLiga the focus|
|Klopp hails Wijnaldum´s ´football smartness´|
|Klavan ready to fight for starting spot after completing ´dream´ Liverpool move|
|Real Salt Lake 1 San Jose Earthquakes 1: Mulholland salvages point|
|Madeira airport to be named after Cristiano Ronaldo|
|Villar, Ceferin and Van Praag announce UEFA presidential bid|
|Witsel has offers from England and Italy|
|Tuchel will bring out Gotze´s best - Watzke|
|Swansea confirm interest in Liverpool´s Allen|
|Arsenal´s Coquelin: LeBron v Curry is like Messi v Ronaldo|
|Rooney backs Allardyce appointment|
|Bayern and Ancelotti respond to Munich attacks|
|West Brom friendly cancelled over violence concerns|
|Allardyce ´cannot stop smiling´ after getting England job|
|Rakitic dismisses Barcelona exit talk|
|Oxlade-Chamberlain salvages draw for Arsenal in opening friendly|
|Bruce leaves Hull City by mutual consent|
|Juventus start Serie A title defence against Fiorentina|
|Guardiola already making impact at Manchester City - Clichy|
|Liverpool sign Netherlands international Wijnaldum|
|Ranieri: Chilwell, Ulloa going nowhere|
|Batshuayi: Conte already making me a better player|
|Allardyce determined to be the best - Davies|
|Wolfsburg sign Mayoral from Real Madrid|
|New coaches the attraction in USA/Europe Champions Cup zone|
|´It was like F1 v F3´ - Mourinho not making hasty judgments on United squad|
|Suarez would welcome Vietto with open arms at Barcelona|
|Glenn hails ´ideal candidate´ Allardyce|
|Juventus begin ICC campaign amid Pogba furore|
|Sunderland look to move forward after Allardyce departure|
|Kuyt backs Wijnaldum for Liverpool success|
|No major trophies, fewer goals than Moyes - the stats behind England boss Allardyce´s career|
|Hayden was wasting his career at Arsenal - Wenger|
|New recruits excite Aubameyang after United rout|
|Allardyce the right man to take England back to basics|
|Solve the Rooney puzzle and restore Sterling´s confidence: Five problems for Allardyce to solve|
|England appoint Allardyce as manager|
|Manchester United 1 Borussia Dortmund 4: Classy BVB hand Mourinho first defeat|
|James vows to stay at Real Madrid|
|Caught in a jam - Minnesota ´explain´ goalkeeper gaffe|
|Clarke nominated for FA chairman|
|Gazidis expects more Leicester-style Premier League triumphs|
|Arsenal snap up Bolton defender|
|Alex the Mann for Liverpool as veteran seals Anfield move|
|Dortmund sign Schurrle on five-year deal|
|Balotelli needs right opportunity - Raiola|
|Lukaku undergoes Lazio medical|
|Suarez: Messi better than Ronaldo by far|
|Allegri remains hopeful of Pogba Juve stay|
|Rakitic´s agent questions Barcelona midfield buys|
|Shearer: England players must respect Allardyce or walk|
|Raiola: I don´t give a damn if Pogba costs a world-record fee|
|Mazinho dreams of Thiago-Rafinha reunion at Barca|
|No heart, no gold says ex-Brazil striker Elber|
|There is space for Mata at United - Mourinho|
|Alonso: Guardiola needs time to improve City|
|Argentina approach Bauza to be coach|
|Inter still ´under construction´ - Ranocchia|
|Mourinho: Rooney will be an important player|
|Ganso prepared for the step up to European football|
|Dyke: Brexit could help England|
|Galatasaray confirm Lucas interest|
|Conte targets Champions League with Chelsea|
|Swansea style attracted new owners Kaplan and Levien|
|Mourinho not concerned if United fail to sign Pogba|
|Mourinho teased Ibrahimovic into United move|