Germany put themselves in pole position in Nations League Group A4 heading into a crunch clash with Spain as Joachim Low's side came from behind to beat Ukraine 3-1.
Timo Werner scored either side of half-time following Leroy Sane's equaliser as Leon Goretzka turned in a dominant midfield display in Leipzig.
It was far from plain sailing for Germany on Sunday morning (AEDT), however, with Andriy Shevchenko's depleted Ukraine side – who hit the post three times – taking a 12th-minute lead.
Goretzka set up two goals in the space of 10 minutes to give Germany the advantage by the interval and while defensive solidity evaded the hosts, Werner's second wrapped up the points.
One of four players to keep his place in Germany's starting XI, Philipp Max created two chances inside the opening five minutes, with Goretzka and Robin Koch failing to hit the target.
Yet Max was partly at fault as, against the run of play, Ukraine took the lead – the PSV defender's weak challenge enabling Oleksandr Zubkov to squeeze the ball back for Roman Yaremchuk to lash home.
Ukraine's lead lasted just 11 minutes, Goretzka robbing Oleksandr Zinchenko of possession before setting up Bayern Munich team-mate Sane, who arrowed a left-footed strike across Andriy Pyatov.
Goretzka had his second assist in the 33rd minute, crossing for Werner to head in from close range after getting on the end of Koch's delightful pass.
Ukraine were inches away from equalising early in the second half, as Zinchenko's deflected effort hit the upright.
Sane then sent a tame finish straight at Pyatov, but – after having a hopeful penalty appeal for handball dismissed – Germany had their third in the 64th minute.
Ilkay Gundogan fed Matthias Ginter, whose cross was swept home by Werner via a deflection. Marlos and Moraes did strike the woodwork at the other end, but the visitors failed to muster a comeback.
What does it mean? Germany and Spain set for decider
With Spain drawing 1-1 in Switzerland, Germany top the table heading into a showdown with Luis Enrique's team in Seville.
Germany – who amassed 20 shots against a Ukraine side shorn of several key players due to injuries and positive coronavirus test results – only need to avoid defeat to progress to next year's Nations League finals at the expense of their next opponents.
Goretzka runs the show
Goretzka has developed into one of the finest box-to-box midfielders in Europe and was at his scintillating best here, registering two assists and a game-high five attempts.
His only disappointment will come with not getting himself on the scoresheet, the 25-year-old heading a great chance at Pyatov in the closing stages.
Defensive issues will worry Low
While Germany's attack purred into life, their defence is still very much a work in progress.
Ukraine only managed six attempts, but had their luck been different the three which struck the woodwork could easily have seen Low's side slip to a defeat.
Estadio La Cartuja hosts Germany's crucial match with Spain on Wednesday, while third-placed Ukraine face Switzerland in Lucerne.