PORTO ALEGRE, Brazil (AP) -- Louis van Gaal can pinpoint the moment he knew his Netherlands team would be able to hold off Australia and secure the win that ultimately put the Oranje through to the knockout rounds of the World Cup.
With just over 20 minutes to go in a frantic, seesawing match, Australia missed a golden chance to take a 3-2 lead.
Sitting on the bench, van Gaal saw that as the sign and turned to his assistant coaches to tell them.
''I said to Patrick Kluivert and Danny Blind, 'We're going to win this match because if they miss that kind of chance, we will score the goal.'''
Seconds later, he was proved right. From the very next attack, substitute Memphis Depay drove a swerving, speculative shot toward the goal from 25 yards. Australian goalkeeper Maty Ryan didn't sight it early enough and the ball shot past his outstretched right hand.
It capped a game that intensified suddenly when a 20th-minute solo run and strike by Arjen Robben was canceled out seconds later by a stunning volley from Australia's inspirational veteran Tim Cahill.
Australia then went ahead with a second-half penalty, only for Robin Van Persie to equalize four minutes later.
The result left the Netherlands, which thrashed defending champion Spain 5-1 in its opening game, on the verge of advancing from Group B. That was confirmed a few hours later when Chile beat Spain, knocking the 2010 World Cup winners and Australia out of contention.
''Bitterly disappointing,'' Australia manager Ange Postecoglou said. ''Just for the players, they were magnificent. They took it to a world-class team. Full credit to them, but I just feel bitterly disappointed they weren't able to get some reward out of it today. We came to this World Cup and we're playing against three of the best nations in the world.''
When Robben opened the scoring, giving him a third goal for the tournament, another rout seemed to be in the works. But that was only for only a matter seconds, with Australia equalizing after Ryan McGowan sent a long, looping pass from the midfield to Cahill, who volleyed over Jasper Cillessen onto the underside of the bar in one of the best goals of the tournament so far.
Mark Bresciano and Matthew Spiranovic missed chances that could have given the Socceroos a halftime lead.
Just before the interval, Cahill needlessly clattered into the back of Bruno Martins Indi and was given a yellow card. He was also booked in Australia's opening 3-1 loss to Chile, meaning he may have played his last World Cup game. Martins Indi was helped off the field, replaced by Depay to start the second half, and later taken to a hospital with a suspected concussion.
At the start of the second half, Netherlands changed from a 5-3-2 system that worked so well against Spain to a more traditional Dutch 4-3-3 style to incorporate Depay, but it was Australia which took the surprise lead with a penalty after Daryl Janmaat handled the ball in the area.
Mile Jedinak converted from the spot in the 54th but Van Persie leveled again four minutes later. He later received his second yellow for the tournament, ruling him out of Netherlands' last group match against Chile.
Australia's best change to regain the lead was in the 68th minute. Tommy Oar had a shooting opportunity down on the left hand side of goal but chose to cross to Mathew Leckie, who could only chest the ball toward the keeper. Depay's goal seconds later was his first for his country.
''Most games are decided on moments and we had out moments,'' Postecoglou said. ''We could have gone 3-2 up and we really had momentum at that time. And unfortunately Matty Lekic just couldn't get the right purchase on it to put it away.''
Australia: Mat Ryan, Ryan McGowan, Jason Davidson, Matthew Spiranovic, Alex Wilkinson, Matt McKay, Mile Jedinak, Mark Bresciano (Oliver Bozanic, 51), Matthew Leckie, Tommy Oar (Adam Taggart, 77), Tim Cahill (Ben Halloran, 69).
Netherlands: Jasper Cillessen, Daryl Janmaat, Daley Blind, Bruno Martins Indi (Memphis Depay, 45), Ron Vlaar, Stefan de Vrij, Nigel de Jong, Jonathan de Guzman (Giorginio Wijnaldum, 78), Wesley Sneijder, Arjen Robben, Robin van Persie (Jeremain Lens, 87).