Cesc Fabregas converted the decisive spot-kick as Spain reached the final of Euro 2012 with a nail-biting 4-2 penalty shoot-out victory over Portugal after a goalless semi-final in Donetsk.
Fabregas fired his shot in off the post to send Spain through after Bruno Alves had hit the bar for Portugal.
Earlier, Cristiano Ronaldo had missed a good chance to put Portugal through in the last minute of normal time while Portugal keeper Rui Patricio made superb saves to deny Jesus Navas and Andres Iniesta in extra-time.
Alvaro Arbeloa and Andres Iniesta wasted early chances for Spain, but Portugal threatened in the 13th minute through Ronaldo, who beat Gerard Pique down the left before crossing towards Nani, with Iker Casillas jumping to make a crucial interception.
Spain still almost grabbed the lead against the run of play in the 29th minute, when Xavi's clever ball found Iniesta on the edge of the box, who rolled the ball onto his right foot before floating a shot inches over Rui Patricio's goal. Within two minutes, Portugal responded with an even better chance as he set free Ronaldo to drilled a low shot just wide.
Belatedly, Spain started to show signs of stirring after half-time, Xabi drilling a shot straight at Patricio from long range, but despite beginning to edge possession, chances continued to be few and far between.
Then came a glorious chance for Ronaldo in the last minute of normal time, when a Portuguese counter-attack saw Raul Meireles feed the Real Madrid man who fired over the bar from the left side of the box.
The Portuguese plainly tired in extra time, and Spain had clear opening in the 104th minute, when Jordi Alba's cross found Iniesta in front of goal but Patricio managed to flap his shot wide from six yards.
Sergio Ramos slammed a long-range free-kick just over the bar before the end of the first period of extra-time, and Patricio had to save from substitute Jesus Navas before the game went to penalties.
Alonso had the first spot-kick saved by Patricio but Casillas evened things up by saving the first Portuguese penalty from Moutinho. Iniesta, Pepe, Pique, Nani and Sergio Ramos all put away their penalties before Alves - who had inadvertently stepped up for the previous penalty which was eventually converted by Nani - hit the bar, leaving Fabregas to put Spain through.