Argentina needed an extra-time own goal to overcome a determined Cape Verde side 3-2 on Saturday and secure a place in the FIFA World Cup Round of 16.
Lionel Messi gave the defending champions the lead in the first half with his 20th World Cup goal after controlling a pass from Lisandro Martinez before finishing over goalkeeper Vozinha.
Cape Verde equalized in the 60th minute when Deroy Duarte finished into the bottom corner after Ryan Mendes found him in space, forcing Argentina into a far tougher contest than many had expected.
Argentina regained the lead two minutes into extra time through Lisandro Martinez, but Cape Verde responded again as Sidny Lopes Cabral fired a powerful shot into the top corner to make it 2-2.
With penalties approaching, Argentina found the winner from a corner. Messi's delivery was met by Cristian Romero, whose header deflected off defender Diney Borges and into the net for an own goal.
Cape Verde continued to press in the closing minutes, but goalkeeper Emiliano Martinez produced an important save to deny Lopes Cabral and preserve Argentina's advantage.
"It would have been madness to lose," Argentina coach Lionel Scaloni said after the match.
"It was a very difficult game. We have to congratulate Cape Verde because they showed again that there are no easy opponents."
The victory came in Scaloni's 100th match in charge of Argentina, although his side were made to work much harder than expected against the World Cup debutants.