A final-minute goal from the heavens has helped the Hockeyroos top their pool and set up a quarter-final clash with a Chinese side powered by Australian hockey royalty.
Needing a two-goal win against Spain to leapfrog Argentina - and importantly avoid European dangers Belgium or Germany in a final-eight knockout - Australia started brilliantly as they laid the foundations for a 3-1 win on Saturday.
Mariah Williams beat two Spanish defenders with a wicked left-to-right aerial drag, then found Alice Arnott's stick with a pinpoint cross as Australia led after just 92 seconds.
Spain rallied though, brilliant Australian goalkeeper Jocelyn Bartram limiting the damage to one goal before two Hockeyroos efforts in the final five minutes delivered the result they needed.
Stephanie Kershaw continued her fine tournament with a deflected goal from a penalty corner to put Australia back in front.
The crucial third goal, to captain Kaitlin Nobbs, came in the final seconds after Spain had rolled the dice and replaced their 'keeper with a field player in search of an equaliser.
"I feel like the heavens opened from above when Spain took off their keeper," Williams said.
"We had that chance for Kaitlin to grab that interception with all she had, and then she ran through and slapped it into the net.
"It was just like it was meant to be."
It left Australia unbeaten and in top spot and on the opposite side of the draw to red-hot favourites the Netherlands.
Instead their first assignment is a familiar Chinese side coached by two-time Hockeyroos Games winner Alyson Annan.
Annan's assistant is former Hockeyroos mentor Ric Charlesworth, who coached Australia's women to two Olympic titles.
China (2-3 in Paris) had the better of Australia in a recent series and have improved immensely under Annan.
They completed their pool play with a confidence-boosting 7-1 thrashing of France on Saturday.
The Hockeyroos tread a similar path in Tokyo, impressive pool-stage form undone by a shock 1-0 loss to India in the quarter-final.
"It's something that we definitely have worked on ... our mindset and going into the quarter-final here, that we don't take the foot off the pedal," Williams said.
"We know we've finished on top, and we know that we're playing a team that hasn't won as many games, but they are just as good as us."
Australia won three golds in four Olympics, but have not podiumed since the third of those in Sydney, 24 years ago.
Quarter-finals will be played on Monday at Yves-du-Manoir Stadium.