The win sealed second spot in the group with six points, level with group winners Brazil, and the Swiss will next face Portugal for a place in the quarter-finals.
Switzerland took the lead through Xherdan Shaqiri’s deflected shot in the 20th minute, making the winger nicknamed ‘the pocket rocket’ the first player from his country to score at three World Cups. Their joy only lasted six minutes with Serbia, needing a win to have any chance of progressing, scoring twice through Aleksandar Mitrovic and Dusan Vlahovic to turn the game around.
But Switzerland responded with a two goals either side of the break from Breel Embolo and Remo Freuler to prolong their stay in Qatar while eliminating the Serbs.