Two-time winners the USA beat Brazil 5-3 on penalties in dramatic fashion to advance to the semi-finals of the women's World Cup on Sunday after the tie had been locked 2-2 in extra time.
US defender Alex Krieger hit the winning penalty after her goalkeeper Hope Solo had earlier saved from Brazil's Daiane to give her side the advantage in the shoot-out.
On the final whistle, American striker Abby Wambach had kept her side in the quarter-final with a dramatic header in the 122nd minute to level the scores after Brazil play-maker Marta had scored in the 92nd minute.
"This is the perfect example of what the United States is all about," said Wambach.
"We never give up. This is incredile, I am so happy. The path is now marked for us and we want to win this tournament."
The game went into extra-time with the scores 1-1 as an own-goal by Brazil defender Daiane after just two minutes was cancelled out by Marta's penalty on 68 minutes which she converted at the second attempt.
The US had been reduced to 10 players when defender Rachel Buehler was sent off just moments before.
The USA will now face France in Moenchengladbach in Wednesday's semi-final for a place in next Sunday's final in Frankfurt while Brazil go home.
"From an emotional point of view, everyone is really sad which is normal after a defeat like that where you lose in the last minute," said Brazil coach Kleiton Lima.
"The girls threw everything into trying to win, we have tried to console them, but it will take time to get over this."
While the Americans came to Dresden having lost 2-1 to Sweden in their final Group C game, Brazil did not concede a goal in the group stages as they swept past Australia, Norway and Equatorial Guinea as Group D winners.
But Brazil leaked their first goal here after just two minutes in front of a sell-out crowd of 25,598.
USA midfielder Shannon Boxx whipped in the first cross of the game and Daiane could only watch in horror as her clearance kick sliced into her own net.
Marta also served a reminder to the US defence of her status as five-time world player of the year when she dribbled from the halfway line at full speed only to fire her shot over the bar on 20 minutes.
The game turned against the Americans in the 65th minute when Buehler brought down Marta in the area as they both went for the ball, but was shown a straight red card by Australian referee Jacqui Melksham.
Justice seemed to have been done when Cristiane's first penalty attempt was saved by Solo.
But Solo appeared to hop in the direction before she dived, so Melksham insisted the penalty be re-taken -- with furious protests from the Americans -- and Marta slammed home the second attempt on 68 minutes.
Solo was booked for her angry response.
Neither side could break the deadlock in normal time, but Marta popped up with what looked like the winner in the 92nd minute when she pivoted on a cross from left wing Maurine.
With time almost up, Wambach's header at the death gave her side the precious life line which was all they needed for a historic win in the shoot-out.