Di Maria ignited the comeback with a stunning free-kick from 25 yards out in the 52nd minute.
Angel Di Maria's free kick helped Argentina fight back to beat Costa Rica in Messi's absence.
Argentina battled back from a first-half deficit to secure a 3-1 victory over Costa Rica. The South American giants found themselves trailing after conceding a goal in the opening 45 minutes.
However, the second half saw a different Argentina emerge, as Di Maria ignited the comeback with a stunning free-kick from 25 yards out in the 52nd minute.
The goal sparked Argentina, with Alexis Mac Allister and Lautaro Martinez adding their names to the scoresheet to seal the win for La Albiceleste.
Di Maria has featured 138 times and scored 38 times for La Albiceleste.
Argentina will defend their Copa America title, with Messi expected to lead the charge later this year.
09:55 - 27.03.2024
Time to take that step: Argentine legend Lionel Messi finally reveals when he will retire
Inter Miami superstar Lionel Messi has finally revealed when he will retire from the beautiful game of football.
Why Messi missed Argentina Friendlies
The eight-time Ballon d'Or winner was absent from Argentina's March international friendlies due to an injury he suffered during Inter Miami's CONCACAF Champions Cup clash.
14:00 - 26.03.2024
FOOTBALL World Cup winner Angel Di Maria's family receive death threats from drug cartel in Argentina
The shocking development comes in the wake of Di Maria expressing his desire to conclude his career at his childhood club, Rosario Central.
Messi has scored five goals and provided two assists in five games for Inter Miami this season.