Mario Gomez scored 18 minutes from time as Germany began Euro 2012 with a narrow win over Portugal in a game that looked destined to end in a stalemate.

With both teams deadlocked and heading toward a goalless draw in  the Bayern Munich striker popped up to head Sami Khedira's deflected cross past goalkeeper Rui Patricio.

It will have been sweet relief for head coach Joachim Low as the tournament favourites struggled to break down a hard working Portugal team that could have snatched an equaliser late through Silvestre Varela but his close range effort was blocked by Manuel Neuer.With both teams expected to progress into the knockout phase and a wealth of talent on the field it appeared as if this would be one of the tournament's most exciting games. But sadly it was anything but.

Despite dominating possession Germany, who were beaten finalists in 2008,  failed to suitably test Patricio for much of the half with Gomez testing him once in the second minute with a tame header from right back Jerome Boateng's cross. Portugal head coach Paulo Bento set his side out to stifle their opponents despite having Cristiano Ronaldo, who scored 60 goals for Real Madrid last season, and Nani in his attack. It worked splendidly as the German's were restricted to half chances although they should have taken the lead in the 31st minute when new Arsenal frontman Lukas Podolski blazed Khedira's pullback over from 15 yards.

And just Denmark's Group B victory over Holland earlier the Portuguese almost broke the deadlock against the run of play as Pepe rattled the crossbar as Germany failed to deal with Nani's corner with the ball bouncing on the line before being cleared. Referee Stephane Lannoy waived away appeals with television replays proving he made the correct decision. The game was crying out for some divine intervention and Ronaldo almost provided it forcing a smart save from Neuer after cutting in from the left before delivering a delicious cross that forced Mats Hummels to head behind.

Boateng then denied the Ronaldo with a brilliant goal saving challenge in the 64th minute as the Portugal skipper looked primed to pull the trigger inside the area. It proved to be crucial as eight minutes later Gomez popped up at the other end to brilliantly steer home Khedira's cross for his 23rd international goal and put Germany on course for all three points. They had to cling on to that advantage though as Portugal staged a late rally with Neuer saving brilliantly from Varela after he connected with substitute Nelson Oliveira's low delivery before Ronaldo teed up Nani but the Manchester United winger saw his shot blocked by Holger Badstuber.