It's heartbreak for the Olyroos, with Spain finding the back of the net in the final 10 minutes of their tense contest.
Spain had 70 per cent of the possession in the first half, but were unable to finish opportunities in front of goal.
A stalemate seemed inevitable until Spain's Mikel Oyarzabal scored with a header off a well-directed lofted cross in the 81st minute.
The Australians fought valiantly to hold off the gold medal favourites with disciplined defence for as long as they did, but sadly it just wasn't enough.
Spain registered 15 shots in Sunday evening's clash while the Aussies managed just two, their first of which came in the 51st minute
Spain ultimately clinched a 1-0 victory despite some late drama, meaning the Olyroos will need at least a draw against Egypt for a spot in the quarter-finals.
Damn. They did so well, but it always felt a matter of time. Nothing to lose here Olyroos, let's take it to them. #Tokyo2020 #football
— Arvind Hickman (@ArvindHickman) July 25, 2021
Heartbreak 💔 @Socceroos #olyroos
— Mark Ochieng (@markochieng13) July 25, 2021