Brazil are through to the round of 16 of the World Cup at the expense of Japan after Gabriel Martinelli scored a late winner in a thriller at NRG Stadium.
Kaishu Sano put the Samurai Blue ahead in the first half with a superb solo effort, but Casemiro headed home from a Gabriel cross to get the five-time winners level.
After conceding the equaliser, Japan struggled to get a foothold back in the game -- and it was Bruno Guimarães who found Martinelli deep into stoppage time who finished low to seal the victory in a gut-wrenching tournament end for Japan.
Here's how it happened.
- Brazil manager Ancelotti won't engage in Japan's 'mind games'
- Takefusa Kubo out vs Brazil but Japan eager to 'change history' at World Cup
Brazil topped Group C after an unbeaten campaign, opening with a draw against Morocco before comfortable 3-0 victories over Haiti and Scotland secured first place with seven points.
The five-time world champions arrived in the knockout stage having scored six goals across their final two group games -- with Vinícius Júnior on song, with four to his name so far, while Neymar made his first tournament appearance in their 3-0 win over Scotland.
The Samurai Blue were looking to build on a group stage which saw them defeat Tunisia 4-0 and battle to draws against both Netherlands and Sweden -- their latter result booking their place in the round of 32. Their misery in the knockouts, having reached the last 16 in both 2018 and 2022, will now continue with their exit.
And they were without Takefusa Kubo, who hasn't appeared since their tournament opener -- but had plenty of threat on paper including Daizen Maeda and their No. 9 Ayase Ueda -- neither of whom were able to get into the game after Brazil's equaliser.
Brazil will meet one of Ivory Coast or Norway in the next round.
