NATAL, Brazil — Clint Dempsey scored in the first minute and rookie substitute John Brooks scored a late game winner as the U.S. defeated Ghana 2-1 Monday in the World Cup opener for both.

The victory gave the Americans a measure of revenge against the tiny West African county that knocked them out of the previous two World Cups and put the U.S. and Germany on top of the Group G, with Ghana and Portugal at the bottom.

Dempsey's goal came on a low shot just 32 seconds into the match. Ghana dominated much the rest of the game, and Andre Ayew leveled in the 82nd minute.

Just four minutes later, Brooks — a 21-year-old who came on at halftime because Matt Besler was injured — scored off a corner from Graham Zusi. It was the first time an American sub had ever scored in the World Cup.

Dempsey's goal made him the first U.S. player to score in three different World Cups and was the fastest ever scored by an American in the tournament.

Dempsey's goal showed the kind of technical flair seldom seen from a squad that typically scores through set pieces. Brooks' game winner came in the waning minutes as the Americans were desperately trying to survive waves of attacks from Ghana.

DaMarcus Beasley, who became the first American to play in four World Cups, started the buildup to Dempsey's goal with a pass to Jermaine Jones, who fed it to Dempsey inside the penalty area.

With a nifty move to split defenders John Boye and Sulley Muntari, Dempsey sent the left-footed shot past goalkeeper Adam Kwarasey, where the ball bounced off the post and in.

Already ahead after the game had barely started, the Americans looked well on their way to erasing eight years of frustration caused by Ghana.

Ghana regrouped at halftime and the U.S. looked punchless on the attack after losing striker Jozy Altidore to an apparent hamstring injury in the 21st minute. Ghana applied relentless pressure on U.S. goalkeeper Tim Howard and finally drew even when captain Asamoah Gyan flicked a backheel pass to Ayew, who used the outside of his left foot for a powerful shot.

Ghana was still pressing for a winner Brooks delivered the header. He appeared shocked to have scored, raising his hands to his head before falling to the ground to be mobbed by his teammates.

In other action

Germany was supposed to be a team that would melt in Brazil's tropics.

Instead it was Portugal that felt the heat on Monday in a match in Salvador. Thomas Mueller scored a hat trick, Portugal played with 10 men after a red card in the 37th minute, and German President Angela Merkel wore a big smile following a 4-0 victory in Brazil's northeast.

Page 2 of 2 - The victory put Germany in control of Group G, with the United States facing Ghana Monday night.

The World Cup continued to deliver lots of goals in the first 12 games — 41.

In the 13th game of the tournament, Nigeria and Iran played a scoreless draw — the first draw of this World Cup. Argentina defeated Bosnia 2-1 on Sunday in the other Group F match, and both will feel confident after watching Nigeria and Iran fail to produce.

Two of the seeded teams — defending champion Spain and Uruguay — have been upset. That fate would not befall Germany.

It was German's 100th World Cup match, and they had it wrapped up by halftime.

Mueller, who led the 2010 World Cup with five goals, scored on either side of Mats Hummels' headed goal as Germany took a 3-0 lead at the break, and added his third goal in the 81st.

"To score three goals in the World Cup opener against such an opponent is great," Mueller said.

"After 20 minutes, we looked up at the clock and thought it was going to be a long day," he added. "But we got into the match very well and when you lead by 2-0 in this heat and then even get the third, it was all over."

Cristiano Ronaldo started at Arena Fonte Nova despite some nagging injuries. The winner of FIFA's best player award, he faded after threatening early in the match. He had a shot from a break that Germany goalkeeper Manuel Neuer blocked, but there was nobody from Portugal to pounce on the rebound.

"We should have used some of our chances better," Mueller said, suggesting it was hard to play in midday heat and humidity.

It really didn't show.

The defending Cup of Africa Nations champion, Nigeria will be more disappointed with the draw than Iran. The performances make Argentina and Bosnia the favorites to reach the knockout stage.