NATAL, Brazil -- Thirty seconds.

That is how long it took for U.S. captain Clint Dempsey and his plucky World Cup teammates to let the world know that they weren't afraid of this Group of Death, that they were going to attack their nemesis, Ghana, from the get-go and never give up.

Two thrilling surprise goals -- one just as the game began, one when it seemed the game was over -- gave the Americans a 2-1 win they desperately craved. They were not going to let Ghana beat them three World Cups in a row. Not a chance.

The piercing final stanza of the "Star Spangled Banner" -- " ... land of the freeeee and the home of the brave" -- still echoed through Arena Das Dunas on a balmy Monday night when Dempsey got the ball from Jermaine Jones, dribbled past a weak defensive challenge and slipped in a perfect finish past Ghana goalkeeper Adam Kwarasey in the 30th second of the match.

It was the fifth-fastest goal in World Cup history, and Ghana coach Akwasi Appiah referred to it as "a disaster for us."

Dempsey roared. U.S. coach Jurgen Klinsmann jumped up and down, arms to the sky, and the bench erupted into celebration, as did the estimated 20,000 Americans (including Vice President Joe Biden) in the stands. "We Believe We Can Win!" they chanted, over and over again.

And that they did, with an 86th-minute header from the unlikeliest of heroes -- substitute defender John Brooks, a 6-4 German-American who was on the roster bubble as of a few weeks ago. Brooks, it turns out, had a dream Saturday night that he scored a game-winning header off a corner in the 80th minute. He was six minutes off, but otherwise, his dream was eerily prescient.

"It was a great moment for me," Brooks said. "It's unbelievable. I had a dream that this happened, and I told my teammates... . After I scored, I fell to the ground and thanked God for this great moment. It couldn't be better. I've never had a dream like that before, but, hopefully, it won't be the last."

The United States can breathe a little easier now with a game against Portugal in Manaus on the horizon. Portugal, down a man for much of the match, lost 4-0 to Germany earlier Monday in their Group G opener.

Klinsmann was giddy afterward, running around on the field hugging players, including Alejandro Bedoya, who started in midfield, the culmination of a four-year-long quest after being the last cut of the 2010 team.

The coach said: "I said it to the bench a few minutes before (the Brooks' goal), 'We're going to get some chances still, we just have to grind it out, push and push.' We have a great spirit. The U.S. always fights to the last minute."

He said Dempsey's goal, while it got the game off to a firecracker of a start, in a way made the remainder of the game more challenging.

"You score after a minute, you think there can't be anything better than that, but in a way, it's not so good, because then we suddenly sat back a little instead of staying in control," Klinsmann said. "You think, 'Oh, we're up, we can stop attacking a little,' but I was yelling at them, 'Keep the line high! Keep the ball! We had problems getting passes connected and possessing the ball."

U.S. goalkeeper Tim Howard agreed: "It's human nature after you fight for a goal and get one that you drop off a little. There was so much of the game left, we wondered, can we keep the tempo going for so long?"

The Americans spent much of the rest of the game hanging back a bit and giving Ghana far more chances than they would have liked. Ghana outshot the United States 21-8. Andre Ayew scored in the 82nd minute, and it appeared the United States would have to settle for a tie.

That's when Brooks had his magical moment.

The victory came with a price.

Forward Jozy Altidore was carried off the game on a stretcher after crumpling to the ground while in full stride with a strained left hamstring in the 21st minute. He will have it scanned early Tuesday, and his return is questionable.

"I was sprinting and I felt something. We'll see what happens," Altidore said. "I was crushed."

Matt Besler, whom Brooks replaced, also tweaked a hamstring, but he is expected to be back for Portugal.

Dempsey also was injured, almost surely breaking his nose when he took a shin to the face. His nose bled heavily, and he went to the sideline, where they stuffed cotton into his nostrils. He returned a few minutes later but said he had trouble breathing the rest of the match and coughed up blood.

The captain said the win showed the team's character and never-say-die spirit.

"We didn't play our best game, but it's a huge three points," he said. "We ground out the result, showed a lot of character. We played our hearts out."

It was a rematch of the 2006 and 2010 World Cup games between these two teams, both of which Ghana won 2-1, sending the Americans packing from Germany and South Africa.

Odds now favor advancement; 39 of 46 teams that won openers in the last four World Cups reached the knockout rounds.

The Associated Press contributed to this report.

Sunday's game
U.S. vs. Portugal, 3 p.m. ESPN

By the Numbers
1: Goals scored by an American substitute in the World Cup after John Brooks' game-winning header
30: Seconds into the game that Clint Dempsey scored, the fastest goal scored by an American in the World Cup

Online extra
THOMPSON II: Win makes U.S. coach Klinsmann look good. Go to www.mercurynews.com/sports