PORTO ALEGRE, Brazil — The Netherlands had to work much harder for a victory over the World Cup’s lowest-ranked team than it did against the defending world and European champion.
A goalkeeping blunder by Maty Ryan handed substitute Memphis Depay his first international goal and the Netherlands a 3-2 win Wednesday after a spirited Australia team had brought the Dutch back down to earth following their 5-1 thrashing of Spain in their Group B opener.
‘‘In a tournament you can’t play every game fantastically from beginning to end,’’ striker Robin van Persie said.
Arjen Robben opened the scoring with a breakaway goal before Tim Cahill’s stunning volley brought the teams even just a minute later.
Mile Jedinak then converted a 54th minute penalty and Van Persie tied it again with his third goal of the tournament four minutes after that.
Then Depay’s long-range shot beat Ryan in the 68th to give the Dutch the victory.
It was a tactical change by coach Louis van Gaal that may have helped turn the game for the Dutch, who gave away the ball too often in the first half under pressure from Australia.
After starting with the same 5-3-2 formation that tore apart Spain, Van Gaal switched to the traditional Dutch system of 4-3-3 at halftime — a change forced on him in part by an injury to Bruno Martins Indi and in part to switch the way his players were approaching the match.
‘‘That is the natural system that every Dutch boy grows up with,’’ Van Gaal said. ‘‘We can always switch to that system. In the second half it went much better.’’
Regardless of which system his team was playing, Van Gaal said he was pleased with its productivity.
‘‘We’ve scored eight goals and conceded three in two matches,’’ Van Gaal said. ‘‘That fits into the ‘Holland school’ of attacking football.’’
The coach was helped again by his star strikers.
Van Persie’s second-half goal was not as spectacular as his header against Spain, but he was again in the right place to slot home a chance.
Robben showed that at 30 he’s still one of the fastest attackers in football, sprinting half the length of the field and driving in a low shot to open the scoring.
‘‘It is fantastic to have strikers like Robben and Van Persie,’’ Van Gaal said. ‘‘They’ve both scored three times and we’ve only been playing two matches . . . and the way they score is also unbelievably good and attractive for the fans.’’
The Netherlands will face Chile in its final Group B match without all-time top scorer Van Persie, who was given his second yellow card of the tournament early in the second half, meaning he is automatically suspended for the next match.
Van Gaal also will have to wait to see whether Martins Indi is fit after the central defender was carried off late in the first half following a late challenge by Cahill and sent to hospital to undergo tests for a possible concussion.
Australia coach Ange Postecoglou praised the Dutch: “They’re going to be a handful.’’