Jesus Navas was the hero as Spain won a dramatic semi-final 7-6 on penalties, after a goalless 120 minutes, to book a long-anticipated meeting with Brazil in the FIFA Confederations Cup Final.
Navas converted the winning spot-kick after Leonardo Bonucci was the first player to miss from the spot, with the shoot-out's 13th attempt.
Neither side could be separated after a tense and pulsating game, with both sides hitting the woodwork in extra time.
There were early chances for Italy, as Christian Maggio was set free behind the Spain defence and Iker Casillas reacted well. Daniele De Rossi also headed wide from a whipped Andrea Pirlo free-kick.
Emanuele Giaccherini then picked the ball up on the Italy left, before cutting inside and hitting a cross-field ball towards Maggio. He nodded the ball back across, but Marchisio could only head wide after throwing himself at the ball.
La Roja then slowed the game down after their opponents' blistering start, but Gli Azzurri came back again. Giaccherini once more found space on the left and delivered yet another brilliant ball towards Maggio. However, Italy’s No2 headed straight at Casillas and the Real Madrid stopper gratefully dived on the ball at the second attempt.
Fernando Torres then fired a Spanish warning shot. The Chelsea striker held off Andrea Barzagli, before brilliantly turning the Juventus defender and firing just wide of Gianluigi Buffon’s left-hand post.
At half-time, Cesare Prandelli replaced Barzagli with Riccardo Montolivo, with De Rossi dropping back into defence.
The second-half started slowly, with Spain retaining possession in the centre of the pitch once again. Andres Iniesta screwed a shot wide, before substitute Navas saw his low drive comfortably saved by Buffon.
Neither side created any real clear-cut chances for the remainder of the second half, with both retaining possession for long periods.
Spain then got a free-kick in the final few seconds, and Xavi whipped in a ball which De Rossi diverted narrowly past the post. There was no time for the corner as Howard Webb blew his whistle to signal the end of normal time.
Both sides went for broke in extra time and Giaccherini went closest for Gli Azzurri, smashing an effort off Casillas’s right-hand post after good build-up play by Maggio.
Some last-ditch defending by De Rossi denied Sergio Ramos as he closed in on a simple finish following a Pique flick-on.
Xavi went closest for Spain in the second half of extra time. His drive from distance was tipped on to the post by Buffon. Martinez collected the ball and crossed agonisingly close to Mata, who threw himself at the delivery but could not connect.
Jesus Navas then saw his drive across goal tipped wide by Buffon as Spain ramped up the pressure in the closing stages, but the match remained goalless and went to the drama of penalties.
Candreva stepped up and confidently converted the opening penalty with a Pirlo-style Panenka effort. There were 11 more perfect penalties before Bonucci fired over the bar.
Jesus Navas was given the opportunity to send Spain into the Final and he slammed his effort low and hard into the bottom left-hand corner.
It was to be Spain's night, and the Maracana awaits for them on Sunday.