Mario Gomez smashes his second goal home
The first game of the day saw Portugal take on Denmark. Portugal knew that nothing more than a win would keep their heads above water. Portugal started the game lively and were rewarded for their efforts in the first 35 minutes, as goals from Pepe and Helder Postiga put the Portuguese up 2-0.
However, Denmark responded through Nicklas Bendtner just before the break, and Bendtner scored again 10 minutes from time to equalise for Denmark.
Cristiano Ronaldo forgot his shooting in the changing room, as the Real Madrid player wasted many chances including one on ones with the Danish goal keeper Stephan Andersen.
However, Varela came off the bench and made sure his right foot shoot was lashed home , moving Portugal level with the Danes on three points and very much in the hunt for a place in the next round.
The result sets up an interesting final day in Group B as Portugal will face the Netherlands while Denmark takes on Germany.
The second game saw group leaders Germany take on Holland. Two goals from Mario Gomez gave Germany a 2-1 victory over Netherlands in their Euro 2012 Group B match almost garunteeing them quarter-finals while the Dutch face a potential early exit.
Gomez fired the Germans into a 24th-minute lead after turning in the area and firing past keeper Maarten Stekelenburg following a superb Bastian Schweinsteiger pass.
The pair combined again 14 minutes later, with Gomez lashing home his third goal in two matches from the right before Dutch forward Robin van Persie cut the deficit in the 73rd with his first goal of the tournament.
The result lifted Germany to six points from two games, following their 1-0 opening win over Portugal, while the Netherlands stare elimination in the face after two defeats in the group following their opening loss to Denmark.
Germany will qualify as group winners if they draw or win their final match against Denmark in Lviv on Sunday. They could still qualify if they lose that match and definitely would if Portugal fail to beat Holland.
The only hope the Dutch have is if they beat Portugal in Kharkiv the same night and Germany win,.
That would leave the Netherlands, Portugal and Denmark all on three points and their positions, and which team goes through as runners-up, would be decided on the goal difference in matches between the three.
The same "mini-league" goal difference scenario would apply if Portugal and Denmark win their final games to leave them level with Germany on six points.
If goal difference cannot divide them UEFA has in place a list of subsequent tie-breakers.