Mario Gomez thumped in a superb 72nd-minute header to give Germany a 1-0 victory over Portugal after they had been frustrated for long periods of a cagey Euro 2012 Group B match on Saturday.
Germany were the more attacking side throughout but were kept at long range by some well-drilled defending by Portugal, who almost snatched the lead in the last minute of the first half when Pepe curled a precise shot against the bar but saw the ball bounce onto the line and away to safety.
The Germans continued to press and got their reward when Sami Khedira swung in a deep cross from the right and Gomes, preferred up front to Miroslav Klose, rose to power home his 23rd international goal.
"I had a good feeling from the start here and I wanted to give something back for the trust (the coach put on me)," Gomez told German television.
"It was clear when Miro (Klose) was on the bench and would come in for me at the end for a few mintues. It's hard to head in a ball when you're taking a step backwards but I think the ball was deflected a bit so it worked out."
Earlier on Saturday Denmark snatched a surprise 1-0 win over Netherlands in the other game in the group considered the toughest of the tournament.
"We were a little tense in the first match, after hearing Denmark beat Holland," said Germany coach Joachim Loew.
"No team wants to get behind in the first match. You get a bit of a spark if you win the first match and that's what we wanted."
Gomez's goal lit up a largely uneventful affair, dominated by packed defenses and stalemate in midfield.
Germany did well to stifle Portugal's rocket-heeled wingers Cristiano Ronaldo and Nani, who both had frustrating evenings as a disappointing Portugal threatened sporadically.
German fans caused almost as much excitement off the pitch, throwing what appeared to be rolled up pieces of paper at the Portuguese players on several occasions in the first half.
Authorities warned supporters three times that such behavior could force the match to be abandoned.
One of Germany's best chances fell to midfielder Thomas Mueller, who fired wide from a good position in the 40th minute.
The miss prompted Loew to spring from the bench and shout in frustration at his players.
Germany twice tested Rui Patricio in the first 10 minutes through a header from Gomez and a Lukas Podolski shot that the keeper grabbed at the second attempt. Podolski later skied an effort well over the bar from just outside the box.
Portugal, who have scored just once in their last four matches, poured forward in the closing minutes with substitute Silvestre Varela denied by keeper Manuel Neuer.
Perhaps just as worrying for coach Paolo Bento was another subdued performance from Ronaldo, who shines for his club Real Madrid but rarely produces a truly memorable performance in big games for Portugal.