Romania emerged victorious in the group, scoring more goals than Belgium in second place, despite all four sides in the group receiving four points from their three games.
The final Group E match between Romania and Slovakia ended in a tight 1-1 tie on Wednesday, guaranteeing both teams a spot in the round of 16.
Slovakia took the lead through a first-half penalty kick from Ondrej Duda, but Razvan Marin of Romania equalized just before halftime.
Romania emerged victorious in the group, scoring more goals than Belgium in second place, despite all four sides in the group receiving four points from their three games.
Slovakia advanced in third position due to a greater goal differential than Ukraine, which finished in fourth place.
It was a memorable moment for Romania, who are into the knockout stages of the Euros for the first time in 24 years.
Romania had only qualified once for the last 16 in their five Euro appearances, but Edward Iordanescu’s tenacious side have ended that long drought
They responded to Iordanescu’s pre-match challenge to make “history” with a combative display fuelled by their army of vociferous fans, who turned the stadium into a sea of yellow.
Slovakia are into the knockout stages of a major tournament for the third time.
They reached the last 16 in the 2010 World Cup and made it to the same stage at Euro 2016.
Knowing a draw would send both teams through, cynics had suggested they would play out a mutually beneficial stalemate.
But there was no sign of Romania settling for a point as they made a fast start.
They threatened an early goal when Andrei Ratiu’s stinging strike was pushed away by Martin Dubravka, with the rebound lashed wildly over by Ianis Hagi.
– Romania mosh-pit –
Marin smashed a free-kick narrowly wide from long range moments late as Romania looked to capitalise on their early dominance.
Slovakia were inches away from snatching the lead as Lukas Haraslin’s free-kick went through a crowd of players and almost crept in at the far post.
It was a warning Romania failed to heed and Slovakia went in front in the 24th minute.
Juraj Kucka whipped in a deep cross that caught the Romania defence standing statuesque, leaving the unmarked Duda free to power his header past Florin Nita from eight yards.
Romania’s response was emphatic as they drew level in the 37th minute thanks to an incisive raid from the son of former Barcelona and Real Madrid star Gheorghe Hagi.
David Hancko’s foul on Hagi was adjudged a penalty by VAR after referee Daniel Siebert initially ruled the offence had taken place just outside the area.
Marin stepped up to drill the spot-kick high into the roof of the net to the deafening delight of the hordes of Romania fans who turned the arena into a frenzied mosh-pit.
The searing Frankfurt heat gave way to a heavy storm in the second half as thunder, lightning and rain swirled around the stadium.
It was a suitably dramatic backdrop to a tense clash that was close to swinging Romania’s way when Marin forced a good save from Dubravka before Denis Dragus skimmed the roof of the net.
Haraslin’s curler flashed past the far post as the storm abated, but, while there was no winner, both sides ended up celebrating their progress to the knockout stage.