Argentina claimed a dramatic penalty shootout victory over Netherlands on Friday to claim a spot in the World Cup semifinals after initially throwing away a two-goal lead in a late collapse in regulation time.

Lionel Messi provided a superb assist with a delicately threaded pass to defender Nahuel Molina who slotted past goalkeeper Andries Noppert to hand Argentina a first-half lead. The Paris Saint-Germain forward added Argentina’s second on 73 minutes with a well-taken penalty.

Stream on ESPN+: LaLiga, Bundesliga, more (U.S.)

Wout Weghorst scored a header on 82 to claw one back for Netherlands to set up a tense end that repeatedly boiled over. Netherlands were handed a final lifeline with what looked to be the last kick of the match when midfielder Teun Koopmeiners stepped up to take a free-kick on the edge of the box before sliding a pass under the wall and slotted home by Weghorst.

Both sides came agonisingly close to netting a winner in extra-time, but neither could edge ahead as the game went to penalties.

Netherlands defender Virgil van Dijk and winger Steven Berghuis missed the side’s opening two penalties, while Argentina converted their first three before Enzo Fernandez missed their fourth. However, striker Lauturo Martinez stepped up and slotted home to secure a drama-filled victory and set up a semifinal clash with Croatia on Tuesday.

The loss for Netherlands eliminates them from the tournament, as well as signalling the end of head coach Louis van Gaal’s third spell in charge. The 71-year-old coach, who is undergoing treatment for prostate cancer, had already made clear ahead of the tournament this would be his last in charge.