Uruguay qualified for their fourth Rugby World Cup with a 32-31 win over Canada in Montevideo.
The result gave the South Americans a 70-60 aggregate win and means they will take their place in Japan next year in Pool D, alongside Australia, Wales, Georgia and Fiji.
Canada, who have been to every World Cup since the tournament began in 1987, will now go into November's four-team play-off for the 20th and final World Cup berth.
Uruguay won the first leg 38-29 in Vancouver last week but Canada looked like they might overcome that deficit and secure an aggregate win.
The visitors raced into a 15-0 lead with two early tries but Uruguay got a try of their own before the break to go in 18-10 behind.
Uruguay, however, took control early in the second period, scoring tries in the 41st and 64th minutes to take the lead.
Both sides continued to add points as the game swung back and forth but Uruguay held on, with first five-eighth Berchesi Pisano kicking 17 points and centre Vilaseca Hontou getting two tries for the winners.