Spain will play their fourth European Championship final on Sunday after Cesc Fàbregas scored the winning penalty in a dramatic shootout against Portugal.
The Barcelona midfielder was the hero of the hour, drilling his penalty in off the left-hand post to spark scenes of wild celebration. Fàbregas also scored the last penalty in the 4-2 victory over Italy in the quarter-final of Euro 2008.
The world champions have now won their past nine knockout games at major tournaments without conceding a goal.
Neither side had produced their best football during the first 90 minutes, with Spain being forced out of their comfort zone, but the defending champions stepped up a gear in extra time and dominated Portugal with several good chances on goal, yet were unable to find the back of the net and the penalty shootout looked inevitable.
The nerves were evident from the off, as goalkeepers Rui Patricio and Iker Casillas denied Xabi Alonso and Joao Moutinho respectively in the first round.
Andreas Iniesta calmly put Spain in front, only for Pepe to keep Portugal on terms with a clinical low finish.
Spain defender Gerard Piqué found the bottom left-hand corner of the net, but Nani responded by firing his spot-kick high into the roof of the net to make it 2-2.
But when Spain's Sergio Ramos nonchalantly chipped his penalty beyond Patricio and Alves hit the bar for Portugal, it was left to Fàbregas to send Spain into the final.
Spain will meet either Germany or Ital in Sunday's final at 20:45 (Spanish time).