Japan lost 1-0 to Poland in their final group match of the World Cup, but still managed to progress to the knockout stages as a result of the fair play rule - picking up fewer yellow cards across the group stages than Senegal.
Neither side performed particularly well in a game of few real chances, but it was Poland who took home the spoils to end their disappointing World Cup campaign with their first victory, preserving their record of winning at least one group match in every World Cup they have participated in since 1938.
The match kicked off at a lively tempo, with both sides given opportunities to catch their opponents on the break but few concrete chances opening up.
As time went on, however, Japan's grip on the game strengthened and they went close in the 12th minute when Shinji Okazaki headed wide from Yuto Nagatomo's cross.
A minute later, the Samurai Blue came close to breaking the deadlock once more with Yoshinori Muto forcing Poland goalkeeper Lukasz Fabianski into a save.
Poland looked slow and lethargic throughout the first half, with little indication that the players were keen to end a miserable World Cup on a high note with a win. Nevertheless, it was the Eagles who came closest to scoring before half time, Kamil Grosicki's header being brilliantly saved by Eiji Kawashima in the 32nd minute.
Poland's striker Robert Lewandowski looked completely isolated throughout the game, the Bayern Munich forward cutting a frustrating figure as his teammates failed to provide their star player with any kind of service.
Poland's laboured approach was contrasted by a lively and energetic Japan side who seemed far more likely to create anything than their opponents for much of the game.
Everything seemed set for Japan to progress to the knockout stages - that is, until Jan Bednarek popped up completely unmarked to volley home from a free kick and put Poland in front.
With the goal meaning that Japan would be heading out of the competition as it stood, the game burst back into life after a drab opening 15 minutes of the second half, as Akira Nishino's side were forced to chase an equaliser.
Yet there was still something missing from Japan's play as the second half wore on, a severe lack of urgency that left Poland protecting their lead fairly comfortably as Adam Nawalka's team calmly passed the ball around in defence for much of the half.
In fact, it was Poland who came closer to scoring the game's second goal as Lewandowski spurned his only chance of the match so far, appearing to lose his footing somewhat as he fired over the bar from close range.
The final ten minutes of the match became a bizarrely passive affair, neither side making any effort to win the ball or launch an attack with Japan on course to progress once more after Colombia took the lead against Senegal in the other Group H match.
Though Japan ran the risk of a late Senegal equaliser against Colombia dumping them out of the World Cup, they were able to narrowly scrape into the knockout stages and will now face either England or Belgium in the round of 16.