A late goal by skipper Vincent Aboubakar ended Cameroon's 20-year wait for a win at the World Cup as the Indomitable Lions bowed out in style by beating a much-changed Brazil 1-0 at the Lusail Stadium on Friday.
With qualification already in the bag after wins over Serbia and Switzerland, Brazil still won Group G, ahead of Switzerland on goal difference, and will face Group H runners-up South Korea, who beat Portugal 2-1, in the next round.
Cameroon, whose last win at the World Cup was in 2002 against Saudi Arabia, were on the back foot for most of the match but sprung to life at the death. Aboubakar powered a header past Ederson then was sent off for collecting a second yellow for taking off his jersey in celebration.
The win was Cameroon's first against Brazil at the World Cup and the South American giants' first defeat by African opposition at the finals.
Brazil had by far the larger share of possession and carved out many more chances than their opponents, but in the end it was Cameroon who got the only statistic that actually counts.
"We dominated the match and had several chances, the only thing missing was a goal," Brazil's Eder Militao said.
"We should have scored but a lack of attention in one play allowed them to score. It's frustrating considering the way we played."
The match played out in a relatively subdued atmosphere in the cavernous Lusail Stadium, the tournament's biggest venue, with Brazil's reserves eager to impress but Tite's side unable to assert their usual flair.
Gabriel Martinelli was Brazil's liveliest player and nearly put the five-time champions ahead in the 14th minute when he was picked out by Fred's ball over the top, but the Arsenal forward's header drew a fine reaction save from Devis Epassy.
Cameroon offered nearly no attacking threat until the first half injury time, when Nicolas Moumi Ngamaleu's cross was met with a powerful downward header by Bryan Mbeumo that Ederson clawed away one-handed at full stretch.
The substitutes stirred Brazil into a sudden flurry of chances with Epassy forced into action three times in as many minutes.
First, Martinelli stung the Cameroon keeper's palms with a snap shot in the 56th minute.
Next, Eder Militao tried his luck from the ensuing corner coaxing a fumble out of the Cameroon keeper, who recovered to scramble the ball out to safety, before the lively Antony got in on the act, forcing Epassy into a diving save to keep out his curling effort.
Tite sent on Pedro in the 64th minute and Rafinha in the 79th as Brazil sought to save their perfect record in the group, but Cameroon clung on until Aboubakar arrived in the right place at the right time to seize his moment.