Running low on hope and almost out of time, the Americans were surely beat, about to make their earliest exit from the Women's World Cup.
And then, with one of the most thrilling goals in U.S. history, they weren't.
Showing a dramatic burst , the Americans packed an entire World Cup's worth of theatrics into a 15-minute span by beating Brazil 5-3 on penalty kicks after a 2-2 tie Sunday night.
Abby Wambach tied it with a leaping header in the 122nd minute, and Hope Solo denied the Brazilians - again - in one of the most riveting games in the history of the World Cup - men's or women's.
"There is something special about this group. That energy, that vibe," Solo said. "Even in overtime, you felt something was going to happen."
The United States advanced to Wednesday's semifinals against France, which eliminated England on penalty kicks Saturday.
The U.S. victory came 12 years to the day the Americans' last caught their country's attention in a big way with their penalty-kick shootout victory over China at the Rose Bowl that gave them their second World Cup title.
For Brazil, it is yet another disappointment at a major tournament. And this one is sure to sting more than any others because Marta had it won for the Brazilians, scoring her second goal of the game in the second minute of overtime for the 2-1 lead. But Erika stalled when she went down on a tackle, and the delay added three minutes of stoppage time to the game.
That was all the time Wambach and the Americans needed, after pushing themselves to limit while playing a woman short after Rachel Buehler's 66th-minute ejection.
"Not for one second," Wambach said when asked if she ever felt the Americans were beat. "I kept saying, all it takes is one chance. I kept holding up one finger to the girls."
Two minutes into stoppage time, Megan Rapinoe blasted a left-footed cross from 30 yards out on the left side that Andreia didn't come close to getting her hands on.
Wambach, one of the best players in the world in the air, made contact and with one furious whip of her head, buried it in the near side of the net from about five yards.
The Americans, shooting first, made their three penalty kicks only to have Cristiane and Marta easily match them. But then it was Daiane's turn - the same Daiane who'd given the U.S. a 1-0 lead with an own goal in the second minute of the game. She took a shot, but Solo batted it away.
After Rapinoe blistered the net with a blast and Ali Krieger converted hers, the Americans raced onto the field.
After Brazil spotted the U.S. the lead in the second minute, it spent the next 63 trying furiously for the equalizer.
When they finally did, it was controversial.
Marta made a dangerous run into the box in the 65th, beating two U.S. defenders and Buehler tracked back and dragged her down. Australian referee Jacqui Melksham not only ruled it a penalty but a red card as well. Cristiane, who already scored one goal off a penalty, took the kick. Solo made a perfect read and smacked it away.
But Melksham ordered the penalty retaken - and gave Solo a yellow card, ruling the American had left her line or a teammate encroached the penalty area before the kick was taken.
As the crowd jeered, Marta stepped up for the retake and buried the ball to pull Brazil even.
But the Americans have talked repeatedly about their resilience. On this day, it was on full display.
"We're just fighting for each other out there," said captain Christie Rampone. "We were totally believing the whole time."