Alexander Sorloth's stoppage-time strike gave RB Leipzig a dramatic 4-3 win over Istanbul Basaksehir in a remarkable Champions League game on Wednesday, as the Germans piled pressure on group rivals Manchester United and Paris Saint-Germain.
Irfan Can Kahveci's superb hat-trick looked to have rescued a draw for Basaksehir as they came back from 3-1 down to draw level, but Norwegian striker Sorloth came off the bench to lash in the winner in the second minute of added time.
The result leaves Leipzig on nine points in Group H, level with United and three ahead of PSG before those sides kicked off at Old Trafford later.
It means that, whatever happens there, Leipzig will qualify for the last 16 if they beat Ole Gunnar Solskjaer's side at home in their final match next week.
Semi-finalists last season, Leipzig had already lost 5-0 in Manchester and 1-0 in Paris in this season's competition, but they were well on top in the early stages in Istanbul and were rewarded as Yussuf Poulsen diverted in Marcel Sabitzer's shot for the opener.
Nordi Mukiele then doubled their lead with the interval approaching, although Kahveci curled in a fine goal from the edge of the box to reduce the deficit in first-half stoppage time.
Still Leipzig looked to be cruising to victory when Dani Olmo made it 3-1 in style midway through the second half, but Turkish international Kahveci pulled another one back and then, after Poulsen struck the post at the other end, he completed his hat-trick from a free-kick with five minutes remaining.
However, Sorloth saved the day for Leipzig with a goal that would not have been warmly received in Manchester.
In Wednesday's other early kick-off, Krasnodar beat Rennes 1-0 in Russia, with Marcus Berg scoring the only goal.
Both sides were already eliminated from Group E with Sevilla and Chelsea through, but Krasnodar's victory means they will parachute into the Europa League and winless Rennes will not be involved in European football at all in the new year.