Substitute Silvestre Varela scored three minutes from the end Wednesday to give Portugal a 3-2 win over Denmark and revive his team's hopes of reaching the European Championship quarterfinals.
Varela scored from short range three minutes after coming on as a substitute in the 84th minute, helping the Portuguese bounce back from a 1-0 loss to Germany in their opening game.
The Portuguese left it late, however, and looked like they would have to settle for a draw after Nicklas Bendtner leveled the score with his second goal in the 80th.
Pepe gave Portugal the lead with a header in the 24th and Helder Postiga added another in the 37th. But Bendtner scored in the 41st when he headed into an open goal after Michael Krohn-Dehli headed across the goal from the back post.
Cristiano Ronaldo had another miserable game, squandering two clear chances in front of Denmark goalkeeper Stephan Andersen.
The Danes entered the match after beating the Netherlands 1-0.
Denmark: Stephan Andersen, Lars Jacobsen, Simon Kjaer, Daniel Agger, Simon Poulsen, William Kvist, Niki Zimling (Jakob Poulsen, 16), Dennis Rommedahl (Tobias Mikkelsen, 60), Christian Eriksen, Michael Krohn-Dehli (Lasse Schoene, 90), Nicklas Bendtner.
Portugal: Rui Patricio, Joao Pereira, Bruno Alves, Pepe, Fabo Coentrao, Raul Meireles (Silvestre Varela, 84), Miguel Veloso, Joao Moutinho, Nani (Rolando, 89), Helder Postiga (Nelson Oliveira, 64), Cristiano Ronaldo.