Portugal defeated Poland 5-3 on penalties to reach the semifinals of Euro 2016 after the teams finished extra time level at 1-1.
Both goals came in the first half as Renato Sanches' effort cancelled out Robert Lewandowski's early strike.
Jakub Blaszczykowski was the only player to miss in the fourth round of the shootout and Ricardo Quaresma delivered the clinching penalty.
Lewandowski put Poland on the board 100 seconds into the game with the second-fastest goal in Euro history.
Cedric Soares misplayed Lukasz Piszczek's long diagonal pass from midfield and it fell to Kamil Grosicki, whose low cross was met by Lewandowski.
The goal ended the striker's 644-minute goal drought for Poland, stretching back to last October.
With Portugal trailing, Cristiano Ronaldo became active and had a spinning shot from 12 yards blocked, then send a 40-yard free kick attempt directly into the wall.
Lewandowski looked equally dangerous for Poland and shook off multiple defenders before unleashing a shot that goalkeeper Rui Patricio handled in the 17th minute.
Poland then had an opportunity with a neat exchange of passing between Artur Jedrzejczyk, Arkadiusz Milik and Grosicki, but the final pass was cut out.
On 28 minutes, Ronaldo scuffed a shot from the top of the box that Lukasz Fabianski stopped, then two minutes later the star forward was left shouting for a penalty when Michal Pazdan crashed into him from behind while chasing Nani's cross.
German referee Felix Brych ignored Portugal's complaints, but they were back level with three minutes anyway.
Sanches, making his first start of the tournament, played a one-two with Nani before firing a shot from the top of the box that deflected off of Grzegorz Krychowiak and past Fabianski.
The goal made Sanches, at 18 years and 317 days, the youngest ever to score a goal in a Euro knockout stage, and third youngest overall after Switzerland's Johan Vonlanthen and England's Wayne Rooney both scored in the group stage in 2004.
Ronaldo's next opportunity came 10 minutes into the second half when Nani played him through into the box, but the Real Madrid star's angled shot only found the side netting.
Cedric's long shot did not miss the post by much in the 64th minute as Portugal began to exert pressure.
But Poland came close to taking the lead five minutes later as Milik got on the end of Jedrzejczyk cross to the near post, but Patricio was able to smother the shot.
Jose Fonte sent a header right at Fabianski following a 78th-minute corner, and two minutes later Poland supporters had a scare when Pepe's attempted through ball was cut out by a sliding Jedrzejczyk, his deflection carrying the ball inches wide of post with Fabianski helpless to stop it.
Ronaldo then missed a glorious chance to win the game five minutes from time when he was alone in on goal but could not connect with substitute Joao Moutinho's lofted ball over the top.
Another opportunity was wasted a minute into extra time when Ronaldo got on the end of a cross in the six-yard box but could not control it. Nani then headed wide in the 98th minute with Ronaldo waiting behind him to shoot with a high boot.
Poland also had their share of looks at goal, Milik notably lashing just over the bar 10 minutes into the extra session.
After neither team came close in the final 15 minutes of extra time, Ronaldo opened the penalty shootout with a goal down the middle.
Lewandowski, Milik, and Kamil Glik answered for Poland with Sanches, Moutinho and Nani on target for Portugal before Patricio saved Blaszczykowski's attempt and Quaresma ended it.
Portugal will next face the winners of Friday's game between Belgium and Wales, with a possible matchup between Ronaldo and his Real Madrid teammate Gareth Bale waiting in the semifinals should Wales advance.