DPA
Moscow
Record winners Brazil avoided the fate of title holders Germany when they booked their place in the World Cup knock-out stages with a 2-0 victory over Serbia on Wednesday.
Man-of-the match Paulinho and Thiago Silva were on target for the Selecao which only at times showed its huge potential but did enough to finish top of Group E, ahead of Switzerland, with Serbia and Costa Rica eliminated.
Brazil on Monday in Samara take on Mexico who finished second in Group F from which the Germans were stunningly eliminated earlier in the day. The Swiss, who drew 2-2 with Costa Rica in the other game, now face group F winners Sweden on Tuesday in St Petersburg.
The five-time winners Brazil had flirted with disaster early on in a 1-1 with Switzerland and a stoppage-time 2-0 against Costa Rica, with criticism on superstar Neymar.
But, with Neymar setting up the second goal, they eventually came through on the night in Moscow's Spartak Stadium and don't even have to face Germany as feared in the last 16 - four years after being humiliated 7-1 by them.
Brazil coach Tite made no change from the Costa Rica game while Mladen Krstajic replaced defenders Branislav Ivanovic and Dusko Tosic with Milos Veljkovic and Antonio Rukavina; and Adam Ljajic in for Luka Milivojevic in midfield following a painful 2-1 loss to the Swiss.
Neymar had a first solo early on and Gabriel Jesus was then offside on another chance but there was an early shock for the Selecao when right back Marcelo had to leave in the 10th, seemingly feeling dizzy and limping, with Felipe Luis taking his place.
Serbia defended high which made them vulnerable against the fast Brazilian attacking trio of Neymar, Jesus and Philippe Coutinho.
But it took until the 25th for Brazil to create another chance, with Neymar's tight angle effort after a one-two with Jesus denied by Vladimir Stojkovic, and Manchester City's Jesus then waited too long three minutes later before getting a shot off which was blocked.
An overhead kick from Aleksandar Mitrovic which went well high over the bar was the first chance of sorts in the 32nd for the Serbs who ideally needed to win to have a chance of surviving the group and not requiring help from Costa Rica.
But Brazil broke he deadlock in the 36th when Coutinho sent a defence-splitting pass down the middle to his Barcelona team-mate Paulinho who chipped into the net over the onrushing Stojkovic.
Serbia now faced a mountain to climb after the break, and Brazil almost clinched the match only for Neymar, set up nicely by Coutinho on the counter, to be denied by Stojkovic.
The Serbs were almost level just after the hour when Mitrovic's header after a mistake from keeper Alisson was blocked by Thiago Silva in front of the goal-line. Sergej Milinkovic-Savic curled wide, and Mitrovic headed into the arms of Alisson, in a frenetic period.
But their fate was sealed in the 68th when Silva rose to nod home Neymar's corner-kick for 2-0, and Serbia protesting in vain that Miranda had wrestled down Mitrovic to give Silva the necessary space.
Scoreline: Brazil 2 (Paulinho 36', Thiago Silva 68') Serbia 0.