Belgium set up a blockbuster last-16 clash with France as Ukraine suffered a group-stage exit after a 0-0 draw in Stuttgart.
All four Group E sides went into the final matches on three points, and two draws to conclude the action meant all finished on four points, the first time that has happened at a European Championship.
Romelu Lukaku had an early effort saved when played in behind, while Artem Dovbyk had a couple of dangerous moments for Ukraine and Ruslan Malinovskyi very nearly scored straight from a corner late on. Malinovskyi had a shot charged down in the closing minutes, before Georgiy Sudakov fired straight at the goalkeeper in stoppage-time.
In truth, though, it was a game low on quality, with Ukraine unable to find the goal that would have sent them through and Belgium crashing out.
Instead, Romania topped the group on goals scored, ahead of Belgium, who know face a nightmare last-16 assignment. Slovakia edged through as one of the best third-placed teams, with Ukraine’s goal difference leaving them bottom.
The nature of the format has been cruel on Ukraine. Slovenia, with three points in a low-quality Group C have progressed into the knockout stages, but four points has not been enough for Ukraine.
The best early chance fell to Lukaku, who was played in by a trademark defence-splitting pass from Kevin De Bruyne in the seventh minute, but as so often in this tournament, the striker fluffed his finish.
Stringing five across the back, defending was the focus for Ukraine and they did so all over the pitch, pressing hard and tackling aggressively, but not recklessly, as they sought to contain the Belgians.
They had chances of their own too, and Roman Yaremchuk will regret not being more selfish when he was played in and, rather than shooting, opted to square to Dovbyk, but his pass was too hard and flew harmlessly across the goal.
Eventually Ukraine had to release the handbrake to go for victory. A triple substitution by Serhiy Rebrov in the 70th minute didn't quite have the desired effect however, and substitute Yannick Carrasco almost scored for Belgium with a stinging shot that was parried away by Anatoliy Trubin.
Malanovsky almost netted with a low corner whipped in at the near post but Koen Casteels was alive to the danger, and Taras Stepanenko headed over from the resulting corner as the Ukrainians increased the pressure.
Belgium could have snatched a late winner but Bakayoko curled his shot past the far post, and Sudakov wasted a glorious stoppage-time chance for Ukraine after a storming attack through the middle, but he fired his shot straight at Casteels.
The referee's whistle went, yet Belgian joy was short-lived as boos and whistles rained down from the stands after another unimpressive display.
Additional reporting by Reuters