Jan Vertonghen's late goal saw 10-man Belgium beat South Korea 1-0 in their final Group H match on Thursday, despite having Steven Defour sent off just before halftime for a nasty two-footed challenge.
The win made it a maximum nine points for the Belgians, who will meet the United States in the last 16 in Salvador on Tuesday while South Korea head for the exit.
The European side had already qualified for the next round, having beaten Algeria and Russia in their first two games, and even a draw would have been enough to claim first place and avoid Germany in the next round.
When Defour was given a straight red for a needless, studs-up challenge on Kim Shin-wook, the game opened up for the Koreans after the break.
But although they had plenty of possession and a series of clear chances, they were caught on the break when Belgim's excellent substitute Divock Origi struck from distance.
Keeper Kim Seung-gyu palmed the ball into the path of the onrushing Vertonghen, who put it away with ease in the 78th minute.
An even first period saw Dries Mertens miss a golden chance for Belgium eight metres from goal when he shot well over while, at the other end, Ki Sung-yueng had a rasping long-range shot well saved by keeper Thibaut Courtois.
Belgium coach Marc Wilmots made seven changes from the team that beat Russia, with captain Vincent Kompany and fellow defender Thomas Vermaelen dropping out due to slight injuries, while playmaker Eden Hazard started on the bench.
In the other Group H game, Algeria claimed second place with a 1-1 draw against Russia and will face Germany in Porto Alegre on Monday.
The Belgians are considered "dark horses" by many pundits to go all the way in Brazil after their star-studded squad went through World Cup qualifying unbeaten.
But they looked far from fluent in their group games, coming from behind late to edge Algeria 2-1, beating Russia through Origi's 88th-minute goal and only just edging past the Koreans.