MIAMI: Argentina were given a huge scare before ending Cape Verde's fairytale run as Lionel Messi netted his 20th World Cup goal in a 3-2 win after extra-time to reach the last 16.
Messi's sublime control and finish for his seventh goal at this tournament in four games put the defending champions in command, but the Blue Sharks doggedly refused to go away.
Deroy Duarte's strike on the hour mark forced Argentina to expand more energy than they would have wanted in the sapping Miami heat.
Lisandro Martinez briefly restored Argentina's lead early in extra time before Sidny Lopes Cabral's stunning shot rocketed into the top corner.
Another Argentina corner finally got the job done when Cristian Romero rose highest to head Messi's corner, the ball going in after taking a deflection off Diney Borges for an own goal.
La Albiceleste will face Egypt next on Tuesday in Atlanta, but there were concerns for Lionel Scaloni on his 100th match in charge despite what appears a favourable draw.
Cape Verde served warning of what they were capable of by holding European champions Spain, Uruguay and Saudi Arabia to draws in Group H to reach the knockout stages in their first World Cup appearance.
The Blue Sharks coach Bubista said the meeting with Messi and the world champions would be "the game of our lives" and it showed in a spirited display that had Argentina sweating for over 120 minutes.
On his return to the city where he now plays his club football for Inter Miami, Messi's every move was greeted like a god by the nearly 65,000 crowd that was awash of sky blue and white jerseys.
The 39-year-old produced a moment of magic with a feather-like touch from Lisandro Martinez's pass to set up a high finish past Vozinha to open the scoring.
In doing so Messi also extended his own record of scoring in eight consecutive World Cup games and opened up a two-goal cushion once more over France's Kylian Mbappe in the battle to be the competition's all-time top goalscorer.
Messi had fired Argentina into the lead with a superb goal on 29 minutes, setting the reigning world champions on course for what most assumed would be a routine win.
But Deroy Duarte's 59th-minute equaliser left Argentina shellshocked, and the African qualifiers then held on improbably to force extra-time.
Lisandro Martinez restored Argentina's lead in the 92nd minute, but once again Cape Verde hit back, Sidny Lopes Cabral curling in a magnificent second on 103 minutes.
Argentina though grabbed the winner in the second period of extra-time before hanging on to clinch victory.
"What we achieved, we wanted to show what was possible for small nations," Cape Verde's Irish-born defensive stalwart Pico Lopes said afterwards. "With big hearts, that you can believe, and dream anything is possible."
Earlier Friday, Egypt defeated Australia on penalties to win a World Cup knockout match for the first time.
Hossam Abdelmaguid coolly converted the decisive spot-kick to seal a 4-2 shootout win over the Socceroos in Arlington, Texas, after the match finished 1-1 following extra time.
Australia coach Tony Popovic rolled the dice by bringing on veteran goalkeeper Maty Ryan for the shoot-out moments before the final whistle at the AT&T Stadium.
But Ryan was unable to bring his influence to bear, failing to get a hand on any of Egypt's successful four penalties.
Australia were left ruing penalty misses from captain Harry Souttar and 18-year-old defender Lucas Herrington, who both blazed over.
"It's history," Egypt talisman Mohamed Salah said afterwards.
"I told the boys before the game that this is the biggest stage you can play on. Enjoy it and don't let the pressure get to you," added the former Liverpool star.
Australia coach Popovic defended the decision to bring on Ryan for the shoot-out.
"We just felt that Maty's experience will be the difference," Popovic said of Ryan before defending the selection of the teenaged Herrington to take a pressure-laden penalty.
"I'm sure you'd be saying something else if the young kid scored," Popovic said.
"You'd probably be sitting there saying how wonderful it is that an 18-year-old took a penalty and scored."
Egypt's win bucked what has hitherto been a disappointing knockout phase for African teams,with South Africa, Ivory Coast, Senegal, Democratic Republic of Congo and Algeria all exiting the tournament in the last 32.
In Friday's other game, Colombia saw off toothless Ghana 1-0 to become the final team to qualify for the World Cup last 16.
Off the field on Friday, anticipation for Sunday's blockbuster last 16 clash between England and Mexico City at the Estadio Azteca was given a jolt of intrigue after it emerged that the kickoff time for the game may be brought forward by several hours due to forecast storms.
But after a chaotic few hours, sources later confirmed the match would go ahead at 6:00pm local time as planned.