Tim Krul came off the bench to save two Costa Rica penalties in a shootout victory that sent the Netherlands into a World Cup semi-final with Argentina.
Louis van Gaal threw on Krul for Jasper Cillessen with seconds left in added time of the second half of extra-time and the move proved to be a tactical masterstroke. The incoming Manchester United manager is making a habit of doing that at this tournament.
Krul has only saved two out of 20 penalties in his time at Newcastle, but Van Gaal obviously saw something in his second-choice goalkeeper in training.
With the scores tied at 0-0 after 120 minutes, Krul saved efforts from Bryan Ruiz and Michael Umana to give the Netherlands a 4-3 win on penalties and finally end courageous Costa Rica's run.
Not bad for a man who was making his World Cup debut having yet to play a minute in Brazil.
Keylor Navas, who had starred in goal for Costa Rica in their penalty-shootout win in the last eight against Greece, pulled off several stunning stops to deny the Netherlands in normal time.
Robin van Persie was guilty of a glaring miss from yards out before the striker saw a free-kick saved and another late effort deflected onto the bar by Costa Rica's Yeltsin Tejeda.
Wesley Sneijder struck the crossbar right at the death before the match went to penalties, having also rattled the post in normal time with a free-kick.
However, Navas couldn't conjure up any more magic with Dutch veterans Van Persie, Arjen Robben, Sneijder and Dirk Kuyt all on target in the shootout to help book the Netherlands' semi-final spot, though it was Krul who stole the headlines.
Chances had been limited during the first 45 minutes, but the match came to life in the second half.
Just past the hour mark, Arsenal's Joel Campbell was brought off - and didn't look happy about it - to be replaced by Marcos Urena, who scored in the 3-1 win over Uruguay.
Costa Rica made another change when Cristian Gamboa eventually limped off after landing on a straight leg and rolling his ankle, with Dave Myrie coming on.
Costa Rica survived a late onslaught towards the end of the 90 minutes. With nine minutes to go, Sneijder struck the post with a free-kick and Ron Vlaar failed to turn in the rebound.
Navas then kept out Van Persie at his near post with six minutes to go, before Van Persie missed a sitter from yards out after Sneijder put it on a plate for him with a deft chip to the back post.
Van Persie then saw an added-time free-kick saved by Navas. Junior Diaz had been lucky to stay on the pitch after bringing down Robben for a free-kick, having already been booked for a challenge on the winger.
Minutes later, Daley Blind sent in a low cross which found its way to Van Persie, whose shot hit Tejeda on the line and then came off the crossbar and bounced away.
Navas continued his heroics in the first-half of extra-time, turning Vlaar's header away from a corner. Costa Rica's hearts were soon in their mouths, however, when their goalkeeper received treatment following a bad landing when he had flapped at a corner, though he eventually got to his feet to resume.
As the clock ticked down, Van Gaal brought off Bruno Martins Indi for Klaas-Jan Huntelaar - who scored the Netherlands' winner from the spot in the last eight against Mexico - in added-time of the first extra period.
With three minutes left in the second half of extra-time, it was then Cillessen's turn for some heroics in goal as he did well to save from Urena, who had beaten three Dutch players before letting rip.
At the other end, Sneijder struck the bar with a dipping shot from outside the box before Robben fired the rebound into Van Persie's back.
Van Gaal then played the last card up his sleeve by bringing on Krul for Cillessen seconds before the whistle blew for penalties.
Celso Borges scored the first penalty for Costa Rica before Van Persie levelled. Krul then dived low to his left to save Ruiz's effort with Robben sending Navas to wrong way to put the Netherlands 2-1 ahead.
Giancarlo Gonzalez made it 2-2 but Sneijder kept his cool to edge the Dutch in front again. Christian Balanos was also on target but Kuyt drilled in low to make it four out of four for the Netherlands.
Umana needed to score to keep Costa Rica's hopes alive but Krul was equal to his effort.