Heidelberg - Second-tier European rugby's roller-coaster trip towards next year's Rugby World Cup saw Germany beat Portugal 16-13 on Saturday to set up a two-leg play-off with Samoa, the winner of which qualifies directly for Japan.
The Germans will travel to Apia on June 30 and host the return leg on July 14, with the winner going on to complete Pool A, facing Japan, Ireland, Russia and Scotland.
The loser will enter a repechage along with Canada, Africa 2 and either the Cook Islands or Hong Kong. That four-team competition takes place in France in November with the winner going into Pool B, including New Zealand, South Africa, Italy and Africa 1.
Qualification among Europe's second-tier countries has been mired in controversy.
Russia were awarded a place at the 2019 World Cup in Japan after World Rugby sensationally disqualified Spain, Romania and Belgium.
Russia had finished third in European qualifying for the World Cup but head to the tournament after Romania, who originally won the section, second-placed Spain and fourth-placed Belgium were all docked points for fielding ineligible players.
Germany, whose front-line players and coaching staff all stood down at the end of 2017 in a dispute with their federation, suddenly found themselves looking at a game with an eye on Japan rather than what should have been relegation.