How the comeback unfolded
Germany put the ball in the back of the net in the 25th minute, but their celebrations were cut short. Jamal Musiala had fouled Odilon Kossounou in the build-up, and the goal was disallowed. Just five minutes later Ivory Coast took the lead against the run of play. Franck Kessie bundled home a rebound after Nathaniel Brown blocked a shot from Amad Diallo.
Another goal was later cancelled for Germany, again because of a foul, and after an hour into the game the scoreboard was still 0-1.
Nagelsmann responded with a triple substitution. Deniz Undav was among those introduced and levelled in the 68th minute with a volleyed finish from Nadiem Amiri's cross. He won it in the fourth minute of stoppage time, turning onto Felix Nmecha's pass before firing past Yahia Fofana.
What the coaches said
Nagelsmann called the win deserved and emotional. "I am very happy that we won the match. In the end, we deservedly won it," he told reporters through a translator. He admitted his side lacked control early and was unhappy with the opening 10 minutes after the interval, which prompted the changes that turned the game.
Undav summed up the mood briefly. "This is a really important victory. We showed great character today," the striker said.
Emerse Fae took pride in his players but rued their finishing. "It's more frustration that we're feeling after this defeat, because we were able to open the score against this strong German side," the Ivory Coast coach said. He put the result down to experience, pointing to late chances his team failed to convert.
A bench that changed the game
Undav's impact off the bench is becoming a pattern. He scored as a substitute in Germany's 7-1 opening win over Curacao and repeated the trick now, taking him to three goals and two assists at the tournament with just 56 minutes on the pitch. Nagelsmann hinted Undav could earn his first World Cup start against Ecuador. "Maybe he can start next time," he said.
The defeat was a harsh one for Ivory Coast, who have scored in their last seven World Cup matches, the longest such run in their history.
The race ahead
Germany sit top of Group E on six points, joining co-hosts the United States and Mexico in the knockout rounds.
Ivory Coast, second on three points, must beat Curacao on 25 June to reach the last 32 for the first time. "Our destiny is still in our hands, or our feet," Fae said. The same day, Germany face Ecuador.