With the two sides tied on points and goals heading into their final matches, each required only a point to be sure of a place in the next round.
In bizarre circumstances, though, Japan went down 1-0 to already eliminated Poland as Senegal lost by the same scoreline to Colombia.
With Colombia climbing to the top of the group, yellow card rankings were required and Japan came out on top, having only been cautioned four times to Senegal's six.
Japan, knowing this outcome, opted not to attack in the closing stages and instead gambled on Senegal not scoring in Samara.