Scotland have beaten Samoa at St James’ Park in Newcastle to finish as runners-up in Pool B – and break Japanese hearts.
Scotland won 36-33 after Samoa led 26-23 at half-time.
Scotland will play whoever wins Saturday’s (17:45) Australia v Wales match at Twickenham, in the quarter-finals.
Japan, who needed Samoa to win in order to stand any chance of progressing to the playoffs, now face a ‘dead’ rubber against the USA at Kingsholm on Sunday.
Japan are already sure of a spot at the 2019 Rugby World Cup as hosts.