The United States secured their place in the Women's World Cup semi-finals with a 5-3 penalty shoot-out win over Brazil in Dresden.
An own goal by Brazil's Daiane was cancelled out by a Marta penalty after the US's Rachel Buehler was sent off.
A Marta strike put Brazil ahead in extra-time but Abby Wambach headed an equaliser in the dying seconds.
After Daiane's penalty was saved by Hope Solo, the US sealed a last-four match-up against France on Wednesday.
In the other semi-final Sweden take on Japan, who knocked out hosts and reigning champions Germany.
US head coach Pia Sundhage said: "I have no words, it was phenomenal. There's something about the American attitude and will to win. They bring out the best performance in each other."
Wambach added: "I think this is a perfect example of what America is about, we never give up. Brazil's a great team, it's unbelievable."
Both Brazil and the US scored their opening two penalties at the Rudolf-Harbig Stadium.
Wambach put the US 3-2 up with a well-taken spot-kick but Daiane was unable to equalise after having her effort saved by Solo.
Megan Rapinoe and Alex Krieger secured the victory for the US when both their spot kicks hit the back of the net.
USA at the World Cup
- Have appeared in every World Cup since they began in 1991.
- Have never finished outside of the top three in a World Cup.
- Crowned World Cup winners in 1991 & 1999.
- Ranked first in the Fifa rankings.
- Went down to a first ever defeat in the group stages of a World Cup with a 2-1 loss to Sweden.
After going behind in the opening two minutes, Brazil could have scored a spectacular equaliser 10 minutes before the interval when Fabiana hit an audacious shot from outside the penalty box, but it struck the crossbar.
Fifteen minutes into the second half, a curling shot by Cristiane from 35 yards out forced Solo into a fantastic save to stop the ball flying into the top corner and pulling Brazil level.
With Brazil struggling to break through the US defence, Buehler was given a contentious red card after the defender was perceived to have pulled down a player in the box on 65 minutes.
The resulting penalty, superbly saved by Solo, had to be taken again after Australian referee Jacqui Melksham ordered a retake and booked Solo for encroachment.
Marta, Fifa world player of the year, buried the retake to draw her side level and take the game to extra-time.
Brazil made the liveliest of starts when Marta put the 2007 World Cup runners-up 2-1 ahead with a goal worthy of the many accolades she has won.
After collecting the ball on the on the edge of the US penalty box, the New York Flash striker sublimely flicked the ball into the corner of Solo's net.
With the match drawing to a close, it appeared as though the US were going to miss out on the World Cup semi-finals for the first time in their history.
But up stepped seasoned international Wambach to leap above Brazil keeper Andreia and plant a header just inside the post.
In the earlier quarter-final, Sweden beat Australia 3-1 to set up a last four clash with Japan in Frankfurt on Thursday.
Andreia, Maurine, Daiane, Aline, Rosana (Francielle 85), Ester, Formiga, Marta, Cristiane, Erika, Fabiana. Subs Not Used: Renata, Beatriz, Barbara, Elaine, Daniele, Thais, Grazielle, Roseane, Thais.
Booked: Maurine, Aline, Marta, Erika.
Marta 68, 92.
Solo, Rampone, Lepeilbet, Boxx, Rodriguez (Morgan 72), O'Reilly (Heath 108), Lloyd, Krieger, Cheney (Rapinoe 55), Buehler, Wambach. Subs Not Used: Mitts, Sauerbrunn, O'Hara, Cox, Lindsey, Barnart, Loyden.
Booked: Solo, Boxx, Lloyd, Buehler, Rapinoe.
Daiane (own goal) 2, Wambach 120,
Jacqui Melksham (Australia).