The United States women's national team beat Australia 4-3 to win the Olympic bronze-medal match Thursday, with Megan Rapinoe and Carli Lloyd both scoring braces.
It was a record-breaking evening for Lloyd, who became the USWNT's top scorer in Olympics history with 10 goals and its second-most-capped player of all time, after Kristine Lilly, with 312 appearances.
Sam Kerr also became the Matildas' all-time top scorer with her first-half strike, while Caitlin Foord added a second for Australia.
Emily Gielnik scored in the final moments of the game to set up a tense finish.
The seven-goal thriller was a marked difference to the group-stage game between the two, which ended 0-0.
Rapinoe -- who said during the week she was "gutted" not to be competing for the gold medal -- opened the scoring after eight minutes with an Olimpico goal.
Kerr pulled one back to bring the game level on 17 minutes. Foord found the Chelsea star in plenty of space, and while USWNT goalkeeper Adrianna Franch did get a touch on the ball, it wasn't enough as it slid under her and into the goal.
Rapinoe added her second on 21 minutes after Australia defender Alanna Kennedy failed to clear the ball in the box and instead handed it straight to Rapinoe, who volleyed the ball perfectly into the back of Teagan Micah's net.
Lloyd scored her first goal at the end of the first half with an assist from Lindsey Horan and completed her brace on 51 minutes after another mix-up from Kennedy.
It looked like the USWNT was going to dominate for the rest of the second half, but Foord headed home for Australia on 54 minutes after a cross from Kyah Simon to keep Vlatko Andonovski's side on its toes.
Lloyd could have had a hat trick 20 minutes from the end of the match but was called offside, the 10th time the USWNT have been found offside in this tournament.
Gielnik's superb strike on 89 minutes gave the Matildas a final chance to draw the game level, but they were unable to find an equalizer.