Argentina claimed a dramatic 4-3 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.
The match finished 2-2 after extra time, with Messi scoring one goal and setting up another. The Netherlands equalized in the 11th minute of second-half stoppage time.
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.
Messi scored from the penalty spot in the 73rd to make it 2-0 with his fourth goal of this year's World Cup.
It took him to 10 goals in the World Cup, tied with Gabriel Batistuta for the most for Argentina, and 94 goals in total in his 169 international games.
"Argentina are among the four best in the world because we showed we know how to play every game with the same desire and the same intensity," Messi said after advancing to the World Cup semifinal for the second time in his career.
"A lot of joy, a lot of happiness. We didn't have to suffer and playing extra time or going to penalties. But we got through and it's impressive."
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.
Enzo Fernandez hit the post near the end of extra time and was the only Argentina player to fail to score in the shootout.
Netherlands defender Virgil van Dijk and winger Steven Berghuis missed the side's opening two penalties, while Argentina converted their first three before Fernandez missed their fourth. However, Lautaro 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.
Information from The Associated Press was used in this report.