The Real Sociedad forward, one of six players from Spain's Euro squad to start the Group C clash at Sapporo Dome, nodded home the only goal of the match in the 81st minute to secure a 1-0 win.
The strike ended a brave Australian resistance against the star-studded Spaniards and leaves the group wide open heading into Wednesday's clash with Egypt.
Graham Arnold's men, who stunned Argentina in their tournament opener on Thursday, sit second in the group behind Spain after two matches.
Argentina are third but have an inferior goal difference to Australia following their 1-0 win over Egypt earlier on Sunday.
It means Australia will reach the last eight if they can match or better Argentina's result against Spain when they face the last-placed Egyptians.
Arnold stuck with the same starting XI that beat the South Americans and despite only have 30% possession in the opening half, Oyarzabal's shot that rattled the crossbar in the 21st minute was as close as Spain came to a breakthrough.
Just when Australia started to dream of a securing a vital draw and putting one foot in the last eight, 24-year-old Oyarzabal popped up to break the Olyroos' hearts.
"I'm very proud of the performance and the players," Arnold said. "They put in a fantastic effort against obviously a very good football nation and team in Spain but I thought we did exceptionally well.
"We're sitting here today with qualification in our own hands. So it's all up to us."
"We've got depth. We've got fresh players ready to go," Arnold said. "OK, three players are suspended, but they will be ready for the quarter-finals."