World Player of the Year Johnny Sexton scored two tries as 14-man Ireland secured a 47-5 bonus-point win over Samoa to reach the Rugby World Cup quarter-finals in Japan on Saturday.
Ireland had Bundee Aki sent off for a high tackle in the first half but they were still too much for Samoa as they qualified from a tight Pool A despite their shock loss to Japan.
With Ireland safely through to the play-offs it leaves Japan and Scotland in a straight shoot-out on Sunday for the remaining Pool A slot.
If the game is cancelled because of Typhoon Hagibis, which slammed into Japan on Saturday, the host team will qualify ahead of Scotland.
Whoever tops the pool will play South Africa in the quarter-finals while the runner-up will face defending champions New Zealand, whose final match against Italy was cancelled because of the typhoon.
Ireland were down to 14 men in the 28th minute when Aki, who is of Samoan descent, was sent off for a shoulder to the head of Samoan fly-half Ulupano Seuteni.
Earlier, Samoa hooker Seilala Lam had been yellow-carded for a similar high shot, but he had tried to lower his point of contact while Aki remained upright and referee Nic Berry ruled there was "a high degree of danger".
Ireland were up 21-5 at the time, but even with a man down they still managed the bonus-point fourth try before half-time when Sexton scored his second.
In the second half, amid farcical scenes of ground staff repairing huge divots that opened up in the newly laid turf, Ireland added three more tries and kept Samoa scoreless.