Brazil secured a place in the Round of 16 and top spot in Group E by waltzing to a 4-0 win over Panama, who were left with minimal hope of joining their opponents. A Henrique tap-in put the South Americans ahead, before a Philippe Coutinho double ensured they finished above Egypt, who beat Austria by the same score, on goal difference.
A Seleção will now face the Group D runners-up, namely Nigeria or Saudi Arabia, while the Pharoahs will meet Argentina with a quarter-final berth at stake.
It looked like men against boys in the opening 15 minutes. However, despite right-wingback Danilo looking in the mood for Brazil, they were unable to seriously test goalkeeper Luis Mejia.
On 18 minutes, Casemiro and Willian combined to present Henrique with great chance, but his shot hit the post. Panama did expose the Brazilian defenders on a couple of occasions, but their final ball let them down. The Central Americans should have been a goal down just before the half-hour when, after Mejia failed to deal with a right-wing cross, Willian somehow missed an open goal.
Mejia atoned for that error with two superb saves from Coutinho and Oscar, but the latter's invention soon afforded Henrique the opportunity to score a simple goal. The No19 made no mistake for his second goal of the tournament. Henrique then turned provider, with Coutinho slotting home his neat pass to make it 2-0 on the stroke of half-time.
Within minutes of the restart, a Casemiro header came back off the crossbar, before Mejia denied Danilo from close range. Brazil nevertheless made it 3-0 on 53 minutes, with Coutinho holding off his marker and firing definitively into the bottom corner.
Harold Cummings nearly increased Brazil's lead by mishitting the ball against his own post, but on 85 minutes it was Panama that hit the woodwork, with Waterman's right-foot effort almost giving them a consolation goal.
The game's fourth goal did come, though. On 89 minutes, with the 44th and last shot of an entertaining game, Dudu received possession on the right and blasted the ball past Mejia.
Brazil had done enough to pip Egypt to first place and remain in Barranquilla.