Amad Diallo scored in the 90th minute to lift Ivory Coast, making their first World Cup appearance in a dozen years, to a 1-0 victory over Ecuador.
The teams combined to hit the crossbar three times in Philadelphia on Sunday (Monday AEST), before the Manchester United winger - who entered as a substitute in the 56th minute - broke through with a left-footed shot from just inside the penalty area that beat diving goalkeeper Hernan Galindez.
Wilfried Singo set up the goal with a strong run down the right side.
Making their fourth appearance in the World Cup and first since 2014, Ivory Coast took a step towards reaching the knockout stage for the first time.
Ecuador saw their 19-game unbeaten streak end with their first loss since a 1-0 decision against Brazil on September 6, 2024.
Elye Wahi hit the crossbar in the 52nd minute for Ivory Coast after Ecuador's John Yeboah and Nilson Angulo did the same in the opening half.
Making their fifth World Cup appearance and looking to reach the knockout round for the second time, Ecuador were playing a virtual home game at Lincoln Financial Field, with most of the capacity crowd of 68,274 wearing the yellow jerseys of La Tri.
Ecuador looked strong before Diallo's goal. Their best chance after halftime came in the 68th minute on Gonzalo Plata's hard shot from about 20 metres out that was parried away by goalkeeper Yahia Fofana.
Ivory Coast were bolstered by the forward play of Yan Diomande. The Leipzig attacker created several scoring chances, particularly down the right side. That included Wahi's near-goal on a flick following Diomande's hard cross.
Ivory Coast, who did not concede a goal while going 8-0-2 in 10 qualifying matches, next face four-time World Cup champions Germany, who defeated Curacao 7-1 earlier on Sunday in Group E.
Ecuador will meet Curacao, with both matches on June 20.
Ivory Coast captain Franck Kessie set the tone for the physical play of Les Elephant with a hard foul in the fourth minute.
Kessie went on to pick up one of three yellow cards for his side, all for reckless challenges, in the opening 45 minutes.
Ecuador's Jackson Porozo was cautioned in the 73rd minute.