After a goalless first half, Breel Embolo scored the only goal of the match three minutes into the second period, finishing from six yards out after a cross from Xherdan Shaqiri on the right.
With Serbia playing as Yugoslavia, the sides had met 18 times, including four encounters in FIFA World Cup group stages: in 1930, 1950, 1954 and 1974, with one victory for each and two draws.
After a goalless first half, Richarlison opened the scoring for Brazil in the 62nd minute, when he followed up to finish after Serbian goalkeeper Vanja Milinković-Savić saved Vinícius Júnior's low shot from the left, with Neymar initially creating the chance.
[8] Richarlison then made it 2–0 eleven minutes later when he controlled the ball from Vinícius Júnior before finishing to the left of the net with an over-the-shoulder acrobatic right-footed kick.
In first-half stoppage time, Strahinja Pavlović equalized with a header, before Sergej Milinković-Savić brought Serbia ahead just two minutes later with a low finish into the corner of the net.
[15] The only goal of the game was scored by Brazilian midfielder Casemiro in the 83rd minute, when his deflected right-footed shot from inside the penalty area struck the top corner of the net.
Serbia, who needed a victory to have a chance of reaching the knockout stage, then went behind again early into the second half, after Freuler finished off a Swiss team goal with a volley.
The game became ill-tempered, similar to the sides' previous encounter in 2018, and saw both sets of players scuffle multiple times, primarily triggered after provocation towards the Serbian bench by Swiss captain Granit Xhaka, an ethnic Albanian.
Despite the Brazilians having the majority of the game's chances, Cameroon would take the lead in second-half stoppage time, after Vincent Aboubakar ran into the penalty area to head the cross from Jerome Ngom Mbekeli on the right into the net's bottom corner from six yards out.