The U.S. and Australian women’s soccer teams played a game Thursday night that was as wild as any you’ll see, and showed why both teams are among the top contenders to win this summer’s World Cup.

Four American players scored in a 5-3 win over the Matildas in suburban Denver that saw the U.S. take an early lead, lose it, score three straight goals in the second half, then nearly lose the lead again before getting a late insurance goal.

Both teams went full throttle from the start. Australia had the game’s first scoring chance after just 20 seconds, and the U.S. had one on the next thrust downfield.

Alex Morgan opened the scoring in the 14th minute. Crystal Dunn played a ball down the left wing that Morgan latched on to, shaking off Claire Polkinghorne along the way. Morgan raced downfield, then around and past Alanna Kennedy, and smashed an unstoppable shot into the far corner.

It was Morgan’s 100th career national team goal, and it was a terrific one.

(By the way, her first national team goal was scored at Talen Energy Stadium on Oct. 6, 2010.)

Australia tied the game 15 minutes later, as veteran Lisa De Vanna finished off a lightning-quick counter attack. She was wide open on the left wing in the buildup because U.S. right back Emily Sonnett, starting in place of the injured Kelley O’Hara, had pinched too far in to the middle of the field. Centerback Abby Dahlkemper gestured at Sonnett to get out toward De Vanna, but Sonnett did so too late.

The game’s frenetic pace continued. In the 32nd minute, Megan Rapinoe came inches away from scoring off a Tobin Heath cross, but Ellie Carpenter made a sliding goal line clearance. In the 39th, Australian star Sam Kerr beat a U.S. double-team of Becky Sauerbrunn and Dahlkemper, but Dahlkemper recovered to make a lunging block of Kerr’s shot from 19 yards.

Seconds before halftime, Heath got free on the right wing and chipped Australian goalkeeper Lydia Williams from just off the end line, but the ball narrowly missed the net.

U.S. coach Jill Ellis made one change at halftime, bringing in Sam Mewis for Rose Lavelle. That moved Lindsey Horan, who shook off a pretty strong hit late in the first half, up to the playmaker position. Ellis said after the game it was planned in advance.

But while the swap bolstered the midfield’s steel, Australia scored within two minutes of the second half kicking off. Julie Ertz gave the ball away with a bad pass that was intercepted, and a few passes later Caitlin Foord carved up the U.S. defense and beat Alyssa Naeher with a shot through traffic. Dahlkemper was among the most guilty, as she stopped a run toward Foord and gave up ample room.

Something clicked for the Americans right then. Whether they got up off the mat or simply kept punching away as they had been can be debated, but this can’t be: they fired in the game’s next three goals.

Heath delivered the equalizer, jumping to meet a cross from Sonnett in the 53rd.

Right on the hour mark, Rapinoe put the U.S. up 3-2. She pounced on a loose ball at the top of the 18-yard box, and just when it seemed like she was out of space and options, she spun on a dime and lashed a shot from 21 yards past Williams — her teammate with the NWSL’s Reign FC in suburban Seattle.

Not lot long thereafter, Rapinoe exited the game after what appeared to be a minor right calf injury. She told reporters after the game that she was fine and had asked to be taken out as a precautionary measure.

Colorado native Mallory Pugh replaced Rapinoe, and in the 67th minute scored the U.S.' fourth goal with just her second touch of the game.

There were still more plot twists. Sam Kerr, who plays for the NWSL’s Chicago Red Stars, cut the U.S. lead to 4-3 in the 81st by soaring over Dahlkemper to meet a Hayley Raso cross with a majestic header.

For good measure, the referee added five minutes of stoppage time. Australia got a few half-chances, but Naeher cleaned them up — and she helped deliver the knockout blow. On the game’s final play, she launched a long ball that flew over three-fourths of the field in the high altitude. Pugh raced past the retreating Aussie back line and chipped Williams.

What to make of such a crazy contest? It’s hard to ignore the many flaws in the U.S. defense. This team is not to win a World Cup with its back line leading the way, as happened four years ago.

Rapinoe, as she often does, put it succinctly in a postgame interview on Fox Sports 1: “We still can’t let that many goals in.”

But it’s also hard to ignore how entertaining the game was, and how much firepower the Americans can bring to any contest. Rapinoe nailed that point, too.

“It’s huge having players come off the bench like Mal,” she said. “In the World Cup that’s what we’re going to need. No one player is going to be able to play every single game, every single minute, and we have firepower like that coming off the bench for us. That’s huge for us.”

Lineups

United States (4-3-3 to start, then many changes): Alyssa Naeher; Crystal Dunn, Becky Sauerbrunn, Abby Dahlkemper (Carli Lloyd 85′), Emily Sonnett (Tierna Davidson 79′); Julie Ertz, Lindsey Horan (Christen Press 64′), Rose Lavelle (Sam Mewis HT'); Megan Rapinoe (Mallory Pugh 66′), Alex Morgan (Allie Long 81′), Tobin Heath

Australia (4-2-3-1 with variations): Lydia Williams; Gema Simon, Alanna Kennedy, Clare Polkinghorne, Ellie Carpenter; Elise Kellond-Knight (Hayley Raso 68′), Emily van Egmond; Lisa De Vanna (Emily Gielnik 57′), Caitlin Foord (Mary Fowler 75′), Tameka Yallop (Katrina Gorry 90′); Sam Kerr,