The Netherlands are through to the last 16 of the 2014 FIFA World Cup, as Group B winners after their 2-0 win in Sao Paulo confined Chile to second place.
With both sides already through to the knockout stages, the deadlock was not broken until the 77th minute. Substitute Leroy Fer scored with his first touch before Memphis Depay also came off the bench to seal top spot for Louis van Gaal's men in stoppage-time.
Spain end with win
Defending champions Spain also won as they overcame Australia 3-0 in Curitiba to bow out of the tournament with some of their pride restored.
David Villa netted on his final international appearance, before second-half goals from Fernando Torres and substitute Juan Mata secured a comfortable win for Vicente Del Bosque.
Group B decider
With key players Robin van Persie and Arturo Vidal both missing and first place up for grabs, a very tactical battle ensued at Arena da Sao Paulo and chances were limited.
Fer came on for his first appearance of the finals and made an immediate impact with his first touch of the ball. A corner was taken short to Daryl Janmaat, whose cross was powered home by the head of the Norwich City man with Claudio Bravo rooted to the spot.
Depay made his mark when he came off the bench to score the winner against Australia in the Netherlands’ second match, and he made an impression again as he made sure that his country qualified as Group B winners in the second minute of stoppage-time.
As Jorge Sampaoli's men pressed for the equaliser, the Dutch broke and Arjen Robben burst down the left before providing the perfect cross for Depay to turn home.
Spain and Australia fly home
Over at Arena da Baixada, Spain took advantage of a very lacklustre Australia in the dead rubber match between the two pointless sides.
Del Bosque made a total of seven changes to the side that were eliminated by Chile. One of them, Villa marked his final cap in trademark style with his 59th international goal. A patient build-up from the Spanish saw Juanfran pull the ball across the area for an unmarked Villa to cleverly flick the ball past Matthew Ryan.
Midway through the second half it was two when Andres Iniesta provided a precise through ball that was neatly tucked away by Torres.
Mata managed to score after only appearing in the final few minutes of the victorious Euro 2012 campaign, and he did the same again two years on. Again he had far too much space in the area to receive Cesc Fabregas’ ball, and coolly slipped number three through the legs of Ryan.
So the final standings in Group B sees the Netherlands through as winners with the maximum nine points, Chile in second with six, Spain third with three, and Australia bottom and pointless.