Updated

Spain will have the chance to defend its crown in the Euro 2012 final as it narrowly escaped Donetsk on Wednesday, defeating Portugal 4-2 on penalties.

Cesc Fabregas came into the match as a substitute, but he left a lasting impact as his fifth kick for La Roja, reminiscent of his game-winning penalty against Italy in the Euro 2008 quarterfinal, saw Spain advance.

Spain now awaits the winner of Thursday's semifinal between Germany and Italy for Sunday's final in Kyiv where the cup-holders will have a chance to add to their Euro 2008 and 2010 World Cup triumphs and create history by becoming the first national team to win three major tournaments in a row.

Regulation in Wednesday's semifinal came and went with a premium of scoring chances.

Alvaro Arbeloa had arguably the best opportunity of the opening period. The Real Madrid defender latched on to a low cross and looked to place his shot in the upper corner back across goal, but the one-time effort sailed narrowly over the frame.

Spain, again, came within inches of opening the scoring as Andres Iniesta curled a shot inches over the crossbar in the 29th minute.

Ronaldo answered Iniesta's chance moments later with close call. Portugal capitalized on a giveaway by the Spanish defense and the Real Madrid striker quickly lashed a shot on the turn that trickled just wide of the post.

Both sides struggled to get into a rhythm in the second half as the contest finished without a goal through regulation.

Extra time began in the same tame fashion in which the second half of regulation finished, until the Spaniards tested Portuguese goalkeeper Rui Patricio with their best scoring chance of the night.

Jordi Alba juked past a couple of Portuguese defenders in the 113th minute and found Iniesta's darting run into the box. The midfield maestro slammed his one-time effort on goal but Patricio produced a fine point-blank save to parry the shot wide.

Patricio came up big in the second period of extra time when Jesus Navas redirected a low cross on goal from close range. The Portuguese coughed up a rebound on the initial attempt but quickly smothered the ball to deny Spain another crack at goal.

With the match still scoreless after extra time, penalties were needed to determine the finalist.

Both sides missed their first attempts but converted the next two.

Sergio Ramos then stepped up and scored a penalty in the vein of Andrea Pirlo's goal against England in the quarterfinals, rushing up to the spot but calmly chipping the shot down the middle.

Pirlo's brazen goal forced England to miss with its next attempt, and Ramos' goal produced the same result as Bruno Alves slammed Portugal's next attempt against the crossbar.

That miss opened the door for Fabregas to once again play the role of the hero. He obliged, tucking his shot off the post and into the back of the net to send Spain to another final.