Megan Rapinoe scored direct from a corner as she and fellow United States veteran Carli Lloyd hit doubles to sink Australia 4-3 in the Olympic Games bronze medal game.
Australia's replies came from Sam Kerr, Caitlin Foord and Emily Gielnik in the seven-goal feast at Ibaraki Kashima Stadium.
It was 36-year-old Rapinoe and 39-year-old Lloyd who stole the show, though, on what may prove to be farewell appearances for the superstar duo.
Whether they play on in the short term for the national team remains to be seen, but this was likely a final outing at the Olympics for both, and they went out in style.
Rapinoe opened the scoring in the eighth minute when her wicked in-swinging corner from the left evaded everybody and found the net.
Kerr levelled seven minutes later with her 48th goal for Australia – a new national team record – when her shot proved too powerful for Adrianna Franch, but it was soon Rapinoe's time again.
The standout player from the 2019 World Cup smashed in her second goal of this game on the volley, connecting sweetly from around 12 yards after Alanna Kennedy sliced an attempted clearance.
Lloyd, who became the outright second most-capped player in US history by making her 312th appearance, got in on the goals just before half time. Her thumping left-footed shot across goal found the right corner, putting the US 3-1 up.
Lloyd scored again in the 51st minute after another Kennedy error, this time a weak header back to her goalkeeper allowing Lloyd a clear run on goal, with the striker slotting home.
That made her the US team's all-time highest scorer in Olympic women's football with 10 goals. Lloyd won Olympic gold in 2008 and 2012, with Rapinoe also on the triumphant latter team in London.
Australia got back into this game with a header from Foord after 54 minutes, and Kerr headed against the left post two minutes later. Substitute Gielnik rattled in a delicious late third for Australia, but they could not find a fourth.