Lionel Messi scored twice to inspire Argentina to put a dismal first half behind them and beat Algeria 4-3 in a friendly international on Tuesday.
Playing on his club Barcelona's Nou Camp turf, Messi converted a penalty and Argentina's decisive fourth goal to help Alfio Basile's side come back from 2-1 down at halftime.
Mistakes at three Algerian set pieces, particularly from World Cup goalkeeper Roberto Abbondanzieri, allowed the African side three goals to keep the result in the balance throughout.
Basile, who injected the side with purpose by sending on midfielders Javier Mascherano and Lucho Gonzalez for the second half, will be concerned about defensive frailties with the Copa America looming.
Carlos Tevez put Argentina ahead in the opening minute with a penalty after fellow striker Diego Milito was brought down from behind, but any ideas Argentina had of an easy match were soon dispelled.
Algeria equalised after nine minutes when Anthar Yahia headed home a corner past the static Abbondanzieri and took the lead three minutes before the interval with Majid Bougherra's free kick.
Argentina came out all guns blazing for the second half and within 11 minutes of the restart were 3-2
Messi, who hit the post in the 51st minute with a shot from outside the area, converted a 54th-minute penalty after being brought down by defender Mehdi Meniri.
Midfielder Esteban Cambiasso put Argentina in front when he headed home Javier Zanetti's right cross two minutes later.
Messi made it 4-2 in the 73rd minute after a fine one-two with substitute Pablo Aimar but the result hung in the balance to the end after Nadir Belhadj beat Abbondanzieri with another free kick.
Centre-back Roberto Ayala captained Argentina for a record 58th international, having equalled Diego Maradona's mark of 57 in the 1-1 draw with Switzerland in Basel on Saturday.
Ayala, who also extended his Argentine caps record to 109, said he was disappointed with the goals conceded.
"These matches leave you with a sour taste in the mouth because it annoys you to let in three goals from dead balls," he said.
The match was Argentina's final warmup for the Copa America in Venezuela from June 26 to July 15 where they will be in Group C with Colombia, Paraguay and the US.