Far from its best, Spain still advanced to another major final on Wednesday, beating Portugal 4-2 in a penalty shootout after a scoreless draw at the European Championship.
Cesc Fabregas, who came on as a substitute in the second half of regulation time, scored the deciding penalty after Bruno Alves had hit the crossbar for Portugal moments earlier.
"I played poorly, but the team worked really hard," Fabregas said. "I had this intuition that we could advance if we went to penalties and that's what we did."
Spain, seeking its third straight major trophy after claiming titles at Euro 2008 and the 2010 World Cup, will next face either Germany or Italy on Sunday in Kiev.
"Being in another final is a miracle," Fabregas said. "It's really incredible."
Cristiano Ronaldo had several chances for Portugal, but he sent three shots well over the bar as his team held its own for the entire match. The Real Madrid star, who came alive with three goals in his last two matches at the tournament, did not take a penalty in the shootout. He had been slated to take the fifth one, but it never got that far.
After an often dour opening 90 minutes in which the Spanish failed to impress, the match livened up in the 30 minutes of extra time. Spain midfielder Andres Iniesta forced Portugal goalkeeper Rui Patricio into a superb reflex save in the 103rd minute. Iniesta ghosted into the penalty area then held his head in disbelief as Rui Patricio reacted brilliantly to get a strong hand on his shot after Jordi Alba cut the ball back toward the penalty spot.
Rui Patricio made another fine save to deny substitute Jesus Navas in the 111th.
Tempers frayed at times, with Portugal center half Pepe getting a yellow card for a challenge on Xabi Alonso as they went for a high ball. Ronaldo also received some heavy challenges late in the match.
In the shootout, Xabi had the first attempt saved by Rui Patricio. Spain goalkeeper Iker Casillas then saved Joao Moutinho's shot. Iniesta, Gerard Pique and Sergio Ramos then all scored for Spain, while Pepe and Nani scored for Portugal.
"The first one wasn't so lucky, and then we scored the rest of them," Casillas said. "Yes, we really were lucky. Everything is about luck sometimes."