NATAL, Brazil -- After Clint Dempsey’s historic early goal, the United States spent more than an hour struggling to hold off wave after wave of Ghana attacks. It was no surprise when Ghana tied the game in the 82nd minute.

Once again, the Black Stars -- who had eliminated the Americans at the past two World Cups -- were poised to ruin the tournament for the U.S.

With two starters out with injuries, the U.S. barely threatened in the second half until a corner kick in the 86th minute. Graham Zusi lifted the ball into the penalty area, where fellow substitute John Brooks rose above the defense and headed it in for a 2-1 victory, putting the U.S. atop the group with Germany.

"I couldn’t believe it. ...I just ran in the box and hoped that the ball would hit my head and it did," said Brooks, a 6-foot-4 defender who is brought forward for set pieces.

The loss put Ghana at the bottom of Group G with Portugal -- the Americans’ next opponent. The top two teams in the group advance.

At the final whistle, coach Jurgen Klinsmann, the German hired to transform the U.S. from mere World Cup participant into a potential power, threw his arms to the sky and roared.

"The U.S. team always has great spirit," Klinsmann said. "I said it to the bench minutes before we’re going to get some chances still. So we are still in the game after the equalizer, we just need to kind of push and push and grind it out. That’s what they did. Here comes a set piece we trained over and over and over that stuff. And (Brooks) puts it in, so well deserved."

The U.S. lost striker Jozy Altidore to strained left hamstring injury in the 21st minute and his status for the rest of the tournament wasn’t immediately known. Dempsey had his nose broken with a knee to the face.

"I was coughing up blood a little bit. Hopefully I’ll be able to breathe through my nose again before the next game," Dempsey said.

Dempsey’s goal made him the first U.S. player to score in three different World Cups and ranks as the fifth-quickest goal in World Cup history.

Both U.S. goals were surprising. Dempsey’s showed the kind of technical flair seldom seen from a squad that typically scores through set pieces. Brooks’ game winner rescued the Americans just when the U.S. likely would have been happy to escape with at least a draw.

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.

The Black Stars regrouped at halftime, and the U.S. looked punchless on the attack. Ghana enjoyed 59 percent of the possession in the game.

Ghana applied relentless pressure on U.S. goalkeeper Tim Howard and finally drew even when captain Asamoah Gyan flicked a backheel pass to Andre Ayew, who used the outside of his left foot for a powerful shot.

Ghana was still pressing when Brooks scored. The 21-year-old who plays for Hertha Berlin in the Bundesliga, appeared shocked, raising his hands to his head before falling to the ground to be mobbed by his teammates.

"It’s a special moment for the boy, he did well," Klinsmann said.

"What I can say is it was a very tough game," Ghana coach Kwesi Appiah said. "Playing at this level any little mistake can cost you dearly. We didn’t deserve to get the first goal against us."

Under the slogan of "One Nation. One Team", tens of thousands of U.S. fans descended on this coastal city.

While the American fans’ chanted "U-S-A!," the constant rhythms and dancing from the smaller Ghana contingent were soon joined by many of the locals who cheered whenever the Black Stars launched an attack.

"We managed to do the hardest part which was to equalize and push. And we take a goal on set pieces. We know that’s one of their strong points," Ayew aid. "We played a good game. But you could see USA were hungry, too."

Mexico 0, Brazil 0

FORTALEZA, Brazil -- Goalkeeper Guillermo Ochoa made a series of outstanding saves to help Mexico hold Brazil to a pulsating 0-0 draw at the World Cup on Tuesday.

The result leaves both teams with four points each after two games in Group A, ahead of their decisive final matches. Croatia and Cameroon meet on Wednesday for their second games after both opened with defeats.

Ochoa’s first remarkable save prevented Neymar from scoring in the 26th minute. The Brazil striker’s powerful header looked set to fly just inside the post when the goalkeeper dived to his right to push the ball wide.

Ochoa also made three other difficult saves to keep the hosts from breaking the deadlock -- a shot by Paulinho in the 44th, a second-half effort by Neymar from inside the area and a close-range header by Thiago Silva in the 86th minute which produced a remarkable block by the Mexico keeper.

After that, there was still time for a thrilling end to the game in the northeastern city of Fortaleza.

The referee dismissed Brazilian claims for a penalty after Marcelo seemed to have been grabbed in the 88th minute. Mexico then had two great chances, first with Andres Guardado’s shot over the crossbar in the 90th and then with an effort by Raul Jimenez that was stopped by Brazil goalkeeper Julio Cesar in injury time.

It was an evenly-balanced game at the Arena Castelao, with Mexico not allowing Brazil to take control. El Tri didn’t play defensively and created chances throughout the match, especially with long-range shots, while Brazil turned up the pressure in the second half.

But there was no getting past Ochoa.

He denied Paulinho just before halftime, blocking the midfielder’s shot after a loose ball inside the area, and then got his body in the way of Neymar’s drive from inside the area. In the 86th, he was there on cue to block Silva’s powerful header from point-blank range.

Fans wearing Brazil’s green and yellow colors were the majority as expected, but Mexicans took over large seating sections of the stadium and at times were louder than the local fans. Among those in the crowd of 60,342 was NBA star Kobe Bryant, of the Los Angeles Lakers.

Belgium 2, Algeria 1

BELO HORIZONTE, Brazil -- Waiting and waiting for an equalizer, the tension started showing on the faces of the Belgium players as the second half wore on in the country’s first World Cup match in 12 years.

Algeria was on the verge of a major upset in their Group H opener Tuesday, taking the lead through a penalty in the 25th minute. Try as they might, Belgium’s attacking players just couldn’t break down Algeria’s defense.

In the end, it was the Belgian bench which found the way, with substitutes scoring twice for a 2-1 comeback win.

"We tired them. We just tired them down," Belgium coach Marc Wilmots said. "I told them, ‘Don’t worry, we will score."’

Algeria’s surprising lead stood for 45 minutes until Marouane Fellaini’s strong glancing header, with his back to goal, from a Kevin De Bruyne cross in the 70th.

Fellaini, who many had considered would start the match, had only come onto the pitch five minutes earlier and was Wilmots’ final substitution.

Dries Mertens’ right-foot strike beat Algeria’s goalkeeper in the 80th after Eden Hazard saw him free on the right and set him up for the decider. Mertens, who went on at the start of the second half, sent his shot high in the net outside of Rais Mbolhi’s reach.

"We knew it would be tough, that there would be no space," Wilmots said. "We made one error and we paid for it. The bench made the difference. We showed mental strength and we came back."

The error was an obvious one. Belgium left back Jan Vertonghen dragged down Sofiane Feghouli in the area, and the Algerian attacking midfielder got up and converted the resulting penalty.

At that point, Algeria was on course to produce another upset of a major team as it did in 1982 when it beat West Germany in its first group match.

"We played a very good game against one of the favorites," Feghouli said. "We have to build on this."

The Algerians started brightly but faded toward the end against Belgium’s unrelenting attack.

"We saw their strength come through. They showed that Belgium has great players," captain Madjid Bougherra said. "We lacked freshness and energy. The heat cost us."

Belgium, widely billed as the favorite in Group H, next plays Russia, while Algeria meets South Korea on June 22.

Algeria dominated possession in the opening minutes, surging forward and moving the ball with flair. Belgium eventually settled down and regained control, ending the match with 65 percent possession.

Before Belgium’s comeback, the Algeria defense held firm, setting up a bulwark in the final third of the pitch. When Belgium had the ball, Algeria defenders allowed them little room to maneuver -- defenders at times doubled up on Hazard, shutting down space for him to operate down the left.

"We just missed a big upset, a victory," Algeria coach Vahid Halilhodzic said. "We were so close.

"My players have no reason to blush. They may be disappointed, but there is no reason to cry."

Defensive midfielder Axel Witsel had Belgium’s best two opportunities in the first half -- powerful 25-yard shots parried by the Algeria goalkeeper in the 21st and 34th minutes -- and also snuffed out Algeria threats by protecting the back four and winning numerous aerial duels.

Wilmots brought on Mertens for Nacer Chadli after halftime to give Belgium more of an attacking edge. He also took off lone striker Romelu Lukaku, who was left stranded and had a disappointing match, and replaced him with Divock Origi in the 58th. He made his final substitution in the 65th when he brought on Fellanini for Moussa Dembele to give the team more of a physical presence.

"We had to be patient, and we had the weapons on the bench to make the difference," Wilmots said.