The final round of matches in the group - between eventual group winners England and Slovenia, and the Danes taking on Serbia - offered little in the way of exciting football and both finished in scoreless draws.
However, there were plenty of head-scratching permutations.
England finished top of the group on five points, with the Danes and Slovenia on three each, with the same goal difference and two goals scored and conceded.
UEFA confirmed to Reuters on Wednesday morning that yellow cards for technical staff counted towards the disciplinary total, giving the Danes second spot.
A booking for Slovenia coach Milvoje Novakovic earlier in the tournament contributed to their total of seven yellow cards to Denmark's six, setting the Danes up for a last-16 meeting with Germany, while the Slovenians qualified as one of the four best third-placed teams.
Novakovic's booking did not appear on UEFA's disciplinary list, so at one point on Tuesday, after two early Danish bookings, Slovenia were sitting in second. When the cautions levelled out on the night, Denmark were still placed second, on the back of their superior qualifying record.
Slovenia will find out their opponents when the last round of group games is played on Wednesday.
Denmark manager Kasper Hjulmand said that his team was well aware that the final placings in the group might come down to yellow cards, but that he didn't warn them about picking up bookings.
"The only one I was worried about was myself. We said before the match that we shouldn't pick up any stupid yellow cards from the bench, but you cannot play a match, running around, thinking about stuff like that when it's an important match," he told reporters late on Tuesday, still unsure of what criteria ensured that his side had finished second.
"So no, it was all about trying to win it. That was our aim and I had to make sure that I didn't get a yellow card."
The Danes take on Germany in Dortmund on Saturday.