Team GB's hopes of reaching a first Olympic football semi-final ended with a 4-3 defeat after extra time to Australia.
It was a pulsating game which swung one way and then the other, with cruel twists for GB. But Australia were climical when it mattered, thanks in no small part to a Sam Kerr brace.
Australia started with an aggressive press and dominated the tempo, but GB soon got a foothold in the game when Keira Walsh hit the post with a drive from outside the area, leaving Teagan Micah helpless in the Matildas goal.
The woodwork came to Australia's aid again when Rachel Daly's cross inadvertently ricocheted off the bar and into the path of Lauren Hemp, who was then denied by Micah.
Kerr was a constant thorn in GB's side, stretching the defence and threatening in the air, but she wasn't getting many chances. With 10 minutes remaining in the first half, she won a corner, which Steph Catley took and Alanna Kennedy dispatched with a powerful header.
Kennedy broke free of Demi Stokes to give Australia a lead they just about deserved, and they regained their tempo to coast into half time.
Australian goalscorers Alanna Kennedy and Sam Kerr celebrate
Image credit: Getty Images
Just three minutes after the restart, Australia should have made it 2-0. Kyah Simon found herself free in the area, but she couldn't guide her header from Hayley Raso's cross either side of Ellie Roebuck.
Perhaps it was against the run of play, but GB turned the game on its head with two goals inside 10 minutes from Ellen White. Hemp's cross was flicked expertly past Micah, and then she reacted first when the ball fell kindly in the area before slotting home off the post.
Millie Bright's introduction appeared to have shored up GB's defensive rearguard, but they kept giving away free kicks and it allowed Australia to settle themselves down.
With just two minutes remaining, Kerr struck to break GB hearts. She found herself in space and slotted past Roebuck to send the match into extra time.
Micah did well to deny GB with two saves in quick succession when play got back underway. First, she was equal to Walsh's strike from distance, before instinctively blocking from White as she hunted her hat-trick.
It was from then that the game turned once again. GB substitute Nikta Parris was fouled in the area by Ellie Carpenter, but Caroline Weir saw her penalty saved by the brilliant Micah.
At the other end, two minutes before half time in extra time, Australian change Mary Fowler scored with a deflected effort off Steph Houghton.
Kerr sealed progression for Australia when she headed in a fourth seconds into the second half, despite White finally grabbed her third late on.
TALKING POINT - Australia hold their nerve to reach last four
History was going to be made regardless of the result, with both sides aiming for a maiden semi final appearance. Both sides had their moment, but ultimately, Australia controlled the tempo when it mattered most. Team GB couldn't hold on in normal time and then failed to capitalise on a good start to extra time with the penalty miss.
PLAYER OF THE MATCH - Sam Kerr (Australia)
Both Micah and White may have something to say about this, but it is the sign of a great striker that they can be on the periphery for long spells and still be decisive. Kerr was exactly that, keeping her cool for the equaliser and remaining in the right place at the right time for the eventual winner.
Team GB: Roebuck 6, Bronze 6, Houghton 5, Williamson 5, Stokes 5, Walsh 6, Weir 7, Daly 6, Little 6, Hemp 7, White 9 Substitutes: Kirby 6, Bright 7, Scott 6, Parris 6, Ingle 5, Stanway n/a