Belgium were eliminated from the World Cup in the group stage after drawing 0-0 with Croatia at Ahmad bin Ali Stadium on Thursday.
Morocco's 2-1 victory over Canada elsewhere in Group F meant Belgium had to win to advance to the last 16, while Croatia needed to avoid defeat.
A low-quality first half, in which the only talking point was an overturned Croatia penalty, made way for a far more gripping second period.
Romelu Lukaku was brought on at half-time and squandered a few big chances, though ultimately the match finished goalless as Belgium suffered a shock early exit.
Belgium were given an early reprieve when a penalty awarded for Yannick Carrasco's challenge on Andrej Kramaric was overturned for offside against Dejan Lovren in the build-up as Luka Modric was lining up to take it.
The arrival of Lukaku coincided with the game finally coming to life, the Inter striker forcing Dominik Livakovic into the first save of the contest a little over three minutes after coming on.
That in turn sparked Croatia into life and Thibaut Courtois – on his 100th cap – made three saves in the space of four minutes to deny midfield trio Mateo Kovacic, Marcelo Brozovic and Luka Modric.
Lukaku then hit the post with plenty of the net to aim for after Carrasco's blocked shot fell nicely in his path, before heading over from close range with the goal again gaping – though VAR may have intervened even if he had scored.
The biggest miss was still to come as Lukaku failed to help the ball over the line from a couple of yards when Thorgan Hazard's cross was missed by Lovren, meaning elimination for Belgium and a second-place finish behind Morocco for Croatia.