Group E stages concluded after Brazil beat Serbia 2-0 while Switzerland drew with Costa Rica 2-2. Both Brazil and Switzerland go through to the last 16.
Brazil comfortably reached the World Cup last 16 after Paulinho and Thiago Silva scored in each half to give them a 2-0 win over Serbia who were eliminated on Wednesday.
The five-time world champions finished top of Group E with seven points and will face Mexico in the second round.
Serbia ended in third place with three points.
Paulinho broke the deadlock in the 36th minute, when he timed his run perfectly to reach Philippe Coutinho’s lofted through pass and flick the ball over goalkeeper Vladimir Stojkovic.
Serbia forward Aleksandar Mitrovic had two excellent chances to equalise with close-range headers in the second half before Brazil defender Thiago Silva sealed the game with a near-post header from a corner in the 68th minute.
Switzerland v Costa Rica
Switzerland made sure of a place in the last 16 of the World Cup but had to survive some anxious moments in Wednesday’s 2-2 draw with Costa Rica before finishing second behind Brazil in Group E.
The Swiss will meet Sweden in St Petersburg on Tuesday after Blerim Dzemaili opened the scoring with a close-in blast in the 31st minute but only after Costa Rica had twice struck the woodwork in the opening 10 minutes.
Already eliminated, Costa Rica finally got their first goal of the tournament when centre back Kendall Waston headed home a 56th minute corner.
But the Swiss went back in front through Josip Drmic two minutes from time, only to give away a stoppage time penalty from which Bryan Ruiz hit the crossbar before the ball struck the back of goalkeeper Yann Sommer for an equaliser