Cesc Fabregas was the hero again as Spain kept alive their hopes of defending the European title with a dramatic shootout win in Dontesk.
The Barcelona midfielder put Spain into Sunday's Euro 2012 final, drilling his penalty in off the left-hand post to spark scenes of jubilation.
Joao Moutinho and Bruno Alves missed for Portugal, with Cristiano Ronaldo a frustrated, unused fifth penalty-taker.
The match finished 0-0 after extra-time with neither side doing enough to win.
“For Spain to play that badly for 90 minutes and then pick themselves up for extra-time is the sign of a really top side”
It took until half past midnight local time to get there, but Fabregas, who had scored the winning penalty in the Euro 2008 quarter-final win over Italy, ensured Spain proceeded to a final against Germany or Italy on Sunday and remain on course for an unprecedented third successive tournament victory.
The world champions have now won their past nine knockout games at major tournaments without conceding a goal, and are unbeaten in their last 19 competitive matches.
Neither side had produced their fluent best during only the second 0-0 draw of the tournament. At times it was a bad-tempered affair and the apparently inevitable shootout made a nervy start as goalkeepers Rui Patricio and Iker Casillas denied Xabi Alonso and Moutinho respectively in the first round.
Andres Iniesta calmly put Spain in front, only for Pepe to keep Portugal on terms with a clinical low finish. Spain defender Gerard Pique 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 Fabregas to send Spain into the final and spark memories of 2008 when their footballing history changed forever as a nation remembered how to win.
It had been billed as a clash of Ronaldo, the ultimate individualist, and Vicente Del Bosque's finely tuned orchestra - Ronaldo against Spain, Real Madrid against Barcelona, individual brilliance against the collective mastery of the defending world and European champions.
What nobody had accounted for, however, was Spain playing out of tune for long periods - Portugal were the conductors as inspiration gave way to perspiration in Donetsk.
Ronaldo was a constant danger. But at no stage did Spain man-mark him, subject him to rough-house treatment or even cut off the supply from the excellent Moutinho.
Spain's plan simply was to use the ball to mark Ronaldo, controlling the match through possession in an attempt to render him impotent.
Portugal had other ideas. Their physicality and unswerving desire in midfield prevented Spain settling into their familiar rhythm. At every turn, Xavi and Iniesta found a willing opponent, pressing Spain high up the field and forcing mistake after frustrating mistake.
There were warning signs that Spain might find their rhythm when Iniesta linked up with Jordi Alba down the left flank after eight minutes. The Barcelona midfielder collected Alba's pass, drifted beyond two defenders and cut the ball back only for Alvaro Arbeloa to thump a first-time shot over the bar from the edge of the area.
Opportunities such as that soon became the exception rather than the rule, however. Tempers flared at times, passes were misplaced and Portugal grew in confidence.
Ronaldo's confidence was never in question. After 12 minutes, he reduced Gerard Pique to vain pursuit, surging beyond the Barcelona defender with that remarkable power steering only for his delicate cross to be picked off Nani's head by goalkeeper Casillas.
A left-foot snap-shot found the side netting and, with half-time approaching, he spun away from Sergio Ramos, winning a free-kick and responding with that chest-out, hands-on-hips pose he has trademarked. Ronaldo was in the mood.
Spain were out of their comfort zone but their individual brilliance made them a danger on the rare occasions they did attack. Iniesta and Xavi combined well midway through the first half only for the former to curl his shot agonisingly over the crossbar.
After an hour Del Bosque had seen enough, abandoning his original plan to use a traditional centre forward in Alvaro Negredo by introducing Fabregas. The ineffective David Silva also made way for Jesus Navas as Spain sought width.
- Spain will play their fourth European Championship final on Sunday (1964, 1984, 2008 and 2012). They have lost just one (1984)
- Cesc Fabregas also scored the last penalty in the 4-2 victory over Italy in the quarter-final of Euro 2008
- Wednesday's match was the first time since that match in 2008 that a Spain match had finished goalless
Briefly, Xavi began receiving the ball in advanced positions more regularly, showing the poise and the grace to dribble into dangerous areas.
At the other end, Ronaldo thumped a dipping free-kick over the bar after 73 minutes but Portugal's raids were growing more infrequent as they were forced to rely on set-pieces. Ten minutes later, Ronaldo repeated the trick and, as the game ticked into injury time, the Real Madrid man had a chance to win it.
Portugal broke like a sprint-relay team as a Spain free-kick was cleared. The tireless Miguel Veloso found Raul Meireles, but the Chelsea man's pass forced Ronaldo to check his run down the left flank, and his shot was dragged wide.
Fatigue was beginning to show in Portugal's play and it was Spain who revived in extra-time to come as close as at any point to breaking the deadlock.
Navas might have done better with a shot, from which Alba collected and picked out Iniesta's surging run only for the midfielder to see his close-range shot pushed round the post.
Ramos thundered a free-kick inches over the bar from 30 yards moments later, before Patricio was forced into action again, turning Navas's fierce low shot away.
It was all Spain now, and Fabregas put Pedro through on goal with a delightful touch on the half-way line but Portugal flooded back before the Barcelona forward could pull the trigger.
It was a moment that encapsulated the contest - Spain pushed for a winner, desperate to avoid penalties but Fabregas ensured they need not have worried.
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Francesc Fabregas scores a penalty. Portugal 2-4 Spain on penalties.125:12
Spot kick missed by Eduardo Bruno Alves.124:18 Penalty
Garcia Sergio Ramos scores a penalty. Portugal 2-3 Spain on penalties.123:29 Penalty
Penalty scored by Luis Nani. Portugal 2-2 Spain on penalties.122:50 Penalty
Gerard Pique scores a penalty. Portugal 1-2 Spain on penalties.122:12 Penalty
Penalty scored by Kleper Pepe. Portugal 1-1 Spain on penalties.121:26 Penalty
Andres Iniesta scores a penalty. Portugal 0-1 Spain on penalties.120:44
Penalty taken by Felipe Joao Moutinho saved by Iker Casillas.120:05
Penalty taken by Xabi Alonso is saved by Pedro Rui Patricio.120:01
The players are ready for the drama of the penalty shoot-out.120:00 +0:38
The match is going to penalties.119:34
Alvaro Arbeloa delivers the ball, Felipe Joao Moutinho makes a clearance.117:37
The ball is delivered by Ramos Jordi Alba, clearance by Kleper Pepe.116:36
The referee blows for offside against Andres Iniesta. Pedro Rui Patricio takes the indirect free kick.115:53
Centre by Rodriguez Pedro, clearance by Alexandre Fabio Coentrao.115:39
The ball is crossed by Silvestre Varela, Ramos Jordi Alba gets a block in.114:55
A cross is delivered by Gonzalez Jesus Navas, Foul by Francesc Fabregas on Pedro Joao Pereira, free kick awarded. Pedro Rui Patricio takes the direct free kick.113:36
Francesc Fabregas takes the inswinging corner, clearance by Eduardo Bruno Alves.112:55
Felipe Joao Moutinho delivers the ball from the free kick right-footed from left channel, Garcia Sergio Ramos makes a clearance.112:55 Booking
Booking Xabi Alonso receives a yellow card.
Cristiano Ronaldo fouled by Xabi Alonso, the ref awards a free kick.111:34 Substitution
Substitution Raul Meireles leaves the field to be replaced by Silvestre Varela.110:24
Gonzalez Jesus Navas has a drilled shot. Save by Pedro Rui Patricio.109:14
Francesc Fabregas takes a shot. Eduardo Bruno Alves gets a block in.107:15
Unfair challenge on Andres Iniesta by de Castro Custodio results in a free kick. Ramos Jordi Alba takes the free kick.106:51
Miguel Nelson Oliveira delivers the ball, Gonzalez Jesus Navas gets a block in.106:41
The ball is delivered by Alexandre Fabio Coentrao, clearance by Garcia Sergio Ramos.105:18
Free kick awarded for a foul by Miguel Nelson Oliveira on Alvaro Arbeloa. Free kick taken by Alvaro Arbeloa.105:01
The second half of extra time begins.105:01 Substitution
Substitution Miguel Veloso goes off and de Castro Custodio comes on.104:54
Miguel Veloso gives away a free kick for an unfair challenge on Rodriguez Pedro. Garcia Sergio Ramos has an effort direct from the free kick.104:20
Ramos Jordi Alba crosses the ball, Pedro Joao Pereira manages to make a clearance.103:19
Andres Iniesta takes a shot. Pedro Rui Patricio makes a save. Andres Iniesta decides to take the corner short.103:04
Gonzalez Jesus Navas takes the chance to get an effort at goal.101:31
Francesc Fabregas decides to take the corner short.100:53
Francesc Fabregas decides to take a short corner, The ball is swung over by Gonzalez Jesus Navas, Luis Nani gets a block in.100:47
The ball is swung over by Gonzalez Jesus Navas, blocked by Raul Meireles.98:28
The ball is sent over by Ramos Jordi Alba, Kleper Pepe manages to make a clearance.97:04
Rodriguez Pedro gives away a free kick for an unfair challenge on Pedro Joao Pereira. Free kick taken by Kleper Pepe.95:40
The ball is delivered by Rodriguez Pedro, Kleper Pepe manages to make a clearance. Andres Iniesta has an effort at goal from 25 yards. Eduardo Bruno Alves gets a block in.94:41
Free kick awarded for a foul by Felipe Joao Moutinho on Andres Iniesta. Xabi Alonso crosses the ball in from the free kick, Cristiano Ronaldo makes a clearance.93:05
Garcia Sergio Ramos fouled by Felipe Joao Moutinho, the ref awards a free kick. Iker Casillas takes the direct free kick.91:36
Sergio Busquets challenges Raul Meireles unfairly and gives away a free kick. Eduardo Bruno Alves takes the direct free kick.91:08
Cristiano Ronaldo concedes a free kick for a foul on Alvaro Arbeloa. Alvaro Arbeloa takes the free kick.90:48
Rodriguez Pedro is caught offside. Indirect free kick taken by Kleper Pepe.90:32
The ball is crossed by Ramos Jordi Alba, Luis Nani gets a block in.90:12
The ball is swung over by Gonzalez Jesus Navas, Kleper Pepe manages to make a clearance.90:00 +3:38
The whistle goes for the end of normal time.90:00 +2:37
Garcia Sergio Ramos takes the direct free kick.90:00 +2:37 Booking
Booking The referee shows Miguel Veloso a yellow card.90:00 +2:30
Unfair challenge on Ramos Jordi Alba by Miguel Veloso results in a free kick.90:00 +1:19
The ball is sent over by Gonzalez Jesus Navas, blocked by Alexandre Fabio Coentrao. Outswinging corner taken by Xabi Alonso from the right by-line.89:37
Cristiano Ronaldo produces a left-footed shot from the edge of the area and misses to the left of the goal.88:47
Unfair challenge on Xabi Alonso by Miguel Veloso results in a free kick. Xabi Alonso crosses the ball in from the free kick, Eduardo Bruno Alves makes a clearance.88:03
Luis Nani challenges Ramos Jordi Alba unfairly and gives away a free kick. Direct free kick taken by Iker Casillas.86:02 Substitution
Substitution Rodriguez Pedro is brought on as a substitute for Hernandez Xavi.85:15
Hernandez Xavi restarts play with the free kick.85:15 Booking
Booking The referee shows Eduardo Bruno Alves a yellow card for unsporting behaviour.84:52
Free kick awarded for a foul by Cristiano Ronaldo on Sergio Busquets. Free kick taken by Xabi Alonso. Free kick awarded for a foul by Eduardo Bruno Alves on Francesc Fabregas.83:15
Shot comes in from Cristiano Ronaldo from the free kick.83:15 Booking
Booking Alvaro Arbeloa receives a yellow card for unsporting behaviour.83:10
The referee gives a free kick against Alvaro Arbeloa for handball.81:59
Xabi Alonso concedes a free kick for a foul on Cristiano Ronaldo. Cristiano Ronaldo produces a shot on goal direct from the free kick.81:42
Gonzalez Jesus Navas sends in a cross, Eduardo Bruno Alves gets a block in.80:00
Garcia Sergio Ramos takes the free kick.80:00 Substitution
Substitution Miguel Nelson Oliveira replaces Hugo Miguel Almeida.80:00
Free kick awarded for a foul by Luis Nani on Ramos Jordi Alba.78:51
Unfair challenge on Luis Nani by Garcia Sergio Ramos results in a free kick. The free kick is delivered left-footed by Miguel Veloso from right wing, Iker Casillas makes a comfortable save.77:43
Francesc Fabregas has an effort at goal from outside the penalty box which goes wide right of the target.77:24
Pedro Joao Pereira challenges Andres Iniesta unfairly and gives away a free kick. Andres Iniesta takes the direct free kick.76:40
Eduardo Bruno Alves gives away a free kick for an unfair challenge on Francesc Fabregas. Francesc Fabregas restarts play with the free kick.75:51
The ball is swung over by Luis Nani, blocked by Ramos Jordi Alba. Corner taken short by Luis Nani. A cross is delivered by Felipe Joao Moutinho, Hugo Miguel Almeida takes a shot. Save made by Iker Casillas.73:35
Alexandre Fabio Coentrao gives away a free kick for an unfair challenge on Alvaro Arbeloa. Free kick taken by Gerard Pique.72:40
Francesc Fabregas concedes a free kick for a foul on Kleper Pepe. Kleper Pepe takes the free kick.70:54
Foul by Alvaro Arbeloa on Cristiano Ronaldo, free kick awarded. Strike on goal comes in from Cristiano Ronaldo from the free kick.69:35
Alexandre Fabio Coentrao crosses the ball, Gerard Pique makes a clearance.68:05
Gonzalez Jesus Navas sends in a cross, Pedro Joao Pereira manages to make a clearance.67:27
Hugo Miguel Almeida has an effort from just inside the box that misses to the left of the goal.67:01
Hernandez Xavi takes a shot. Save by Pedro Rui Patricio.66:33
Free kick awarded for an unfair challenge on Xabi Alonso by Felipe Joao Moutinho. Strike comes in from Xabi Alonso from the free kick.65:44
Free kick awarded for an unfair challenge on Luis Nani by Alvaro Arbeloa. Direct free kick taken by Eduardo Bruno Alves.64:59
The ball is delivered by Andres Iniesta, clearance by Kleper Pepe.64:39
Corner taken by Hernandez Xavi from the left by-line, clearance made by Raul Meireles.63:42
The free kick is delivered right-footed by Hernandez Xavi from left wing, clearance made by Hugo Miguel Almeida.63:42 Booking
Booking Pedro Joao Pereira goes into the book for unsporting behaviour.63:38
Francesc Fabregas fouled by Pedro Joao Pereira, the ref awards a free kick.62:24
Andres Iniesta is adjudged to have handled the ball. Kleper Pepe takes the direct free kick.60:25
Free kick taken by Sergio Busquets.60:25 Booking
Booking Kleper Pepe receives a yellow card for unsporting behaviour.60:20
Kleper Pepe gives away a free kick for an unfair challenge on Xabi Alonso.59:47 Substitution
Substitution Gonzalez Jesus Navas joins the action as a substitute, replacing David Silva.59:47 Booking
Booking The referee books Sergio Busquets for dissent.58:46
The assistant referee signals for offside against Hugo Miguel Almeida. Gerard Pique restarts play with the free kick.58:09
Hugo Miguel Almeida has an effort at goal from deep inside the area missing to the left of the goal.56:46
Effort from just outside the area by Hugo Miguel Almeida goes over the bar.55:58
Inswinging corner taken right-footed by Luis Nani from the left by-line to the near post, clearance by Francesc Fabregas.53:52
The referee penalises Luis Nani for handball. Iker Casillas takes the free kick.53:17 Substitution
Substitution Francesc Fabregas is brought on as a substitute for Alvaro Negredo.51:52
Pedro Joao Pereira sends in a cross, Garcia Sergio Ramos gets a block in. Felipe Joao Moutinho takes a outswinging corner to the near post, Xabi Alonso manages to make a clearance.51:08
Hernandez Xavi delivers the ball, Hugo Miguel Almeida makes a clearance. Garcia Sergio Ramos is caught offside. Eduardo Bruno Alves takes the free kick.50:34
The ball is delivered by Alvaro Arbeloa, Pedro Joao Pereira manages to make a clearance. Hernandez Xavi decides to take the corner short.48:44
Free kick awarded for a foul by Eduardo Bruno Alves on Alvaro Negredo. Hernandez Xavi takes the free kick.48:31
The ball is swung over by Luis Nani, clearance made by Gerard Pique.46:53
Unfair challenge on Garcia Sergio Ramos by Hugo Miguel Almeida results in a free kick. Sergio Busquets takes the free kick.46:19
Free kick awarded for an unfair challenge on Pedro Joao Pereira by Ramos Jordi Alba. Free kick taken by Kleper Pepe.45:42
Free kick awarded for a foul by Luis Nani on Xabi Alonso. Xabi Alonso takes the direct free kick.45:01
The game restarts for the second half.45:00 +1:29 Half time
Half Time The half-time whistle blows.45:00 +0:55
Free kick awarded for an unfair challenge on Alvaro Negredo by Eduardo Bruno Alves. A cross is delivered by Hernandez Xavi, Garcia Sergio Ramos takes a shot. Save made by Pedro Rui Patricio.45:00 +0:06
Free kick awarded for an unfair challenge on Eduardo Bruno Alves by Alvaro Negredo. Free kick taken by Eduardo Bruno Alves.45:00 +0:06 Booking
Booking Alexandre Fabio Coentrao goes into the book for dissent.41:52
Alvaro Arbeloa concedes a free kick for a foul on Cristiano Ronaldo. Cristiano Ronaldo restarts play with the free kick.40:27
The ball is delivered by Alexandre Fabio Coentrao, Gerard Pique manages to make a clearance.39:55
Free kick taken by Felipe Joao Moutinho.39:55 Booking
Booking Garcia Sergio Ramos goes into the referee's book.39:52
Unfair challenge on Cristiano Ronaldo by Garcia Sergio Ramos results in a free kick.39:08
The ball is sent over by Xabi Alonso, Eduardo Bruno Alves manages to make a clearance.36:53
Eduardo Bruno Alves concedes a free kick for a foul on Alvaro Negredo. Direct free kick taken by Xabi Alonso.30:41
Effort from the edge of the penalty box by Cristiano Ronaldo goes wide of the right-hand upright.29:16
Foul by Xabi Alonso on Luis Nani, free kick awarded. Miguel Veloso restarts play with the free kick.28:25
Effort on goal by Andres Iniesta from just inside the box goes harmlessly over the target.26:44
Centre by Raul Meireles, clearance made by Garcia Sergio Ramos.25:59
The ball is sent over by Pedro Joao Pereira, save made by Iker Casillas.25:46
The ball is swung over by Alexandre Fabio Coentrao, Ramos Jordi Alba makes a clearance.25:34
Pedro Joao Pereira crosses the ball, clearance by Gerard Pique.24:44
Free kick awarded for a foul by Miguel Veloso on Andres Iniesta. Direct free kick taken by Garcia Sergio Ramos.24:00
The assistant referee signals for offside against Hugo Miguel Almeida. Indirect free kick taken by Iker Casillas.23:21
Cristiano Ronaldo takes a shot from deep inside the box clearing the bar.22:41
Unfair challenge on Alexandre Fabio Coentrao by Alvaro Arbeloa results in a free kick. Free kick taken by Alexandre Fabio Coentrao.17:39
Hugo Miguel Almeida concedes a free kick for a foul on Garcia Sergio Ramos. Garcia Sergio Ramos takes the free kick.16:38
Felipe Joao Moutinho takes a inswinging corner from the left by-line to the near post, Garcia Sergio Ramos manages to make a clearance.15:28
Free kick awarded for an unfair challenge on Cristiano Ronaldo by Alvaro Arbeloa. Cristiano Ronaldo produces a shot on goal direct from the free kick.14:40
Alvaro Arbeloa gives away a free kick for an unfair challenge on Alexandre Fabio Coentrao. Pedro Rui Patricio restarts play with the free kick.12:36
A cross is delivered by Cristiano Ronaldo, save made by Iker Casillas.9:24
Andres Iniesta has an effort at goal from outside the area which goes wide right of the goal.8:40
Alvaro Arbeloa takes a shot from just inside the penalty box which clears the bar.8:20
The ball is crossed by David Silva, blocked by Kleper Pepe.7:57
Alvaro Arbeloa fouled by Raul Meireles, the ref awards a free kick. Alvaro Arbeloa takes the free kick.6:08
Foul by Felipe Joao Moutinho on Ramos Jordi Alba, free kick awarded. Hernandez Xavi takes the direct free kick.5:08
Pedro Joao Pereira gives away a free kick for an unfair challenge on Xabi Alonso. Direct free kick taken by Garcia Sergio Ramos.3:48
Free kick awarded for a foul by Gerard Pique on Hugo Miguel Almeida. Free kick taken by Miguel Veloso.2:20
Unfair challenge on Alexandre Fabio Coentrao by Alvaro Arbeloa results in a free kick. Direct free kick taken by Eduardo Bruno Alves.1:54
Inswinging corner taken by Raul Meireles, Iker Casillas makes a comfortable save.1:19
Corner taken by Miguel Veloso, save by Iker Casillas.1:11
Miguel Veloso takes a shot. Blocked by Gerard Pique.0:00
The game begins.
Live data and text provided by our data suppliers