RB Leipzig left it late to break Union Berlin hearts but they were far from convincing as Emil Forsberg sent them into the DFB-Pokal final.
The Bundesliga third-placed side host Rangers next week ahead of a return leg at Ibrox with the two sides battling it out for a place in the Europa League final.
First though they had a double-header with Union Berlin to take care of - the first and most important in the cup semi-finals.
Domenico Tedesco's side got there in the end but on this evidence, Rangers should take plenty of confidence.
They looked sluggish, created very little and needed a controversial VAR penalty to level matters in the DFB Pokal semi-final before they won it at the death.
They will be firm favourites to beat Freiburg in the final and win their first ever trophy.
But in front of a record crowd, watching Rangers scouts will certainly think they have a real chance with the first leg in Saxony next week before they take them back to Ibrox.
It was a record attendance for the Red Bull Arena which was full to its 47,069 capacity for the first time.
Union Berlin fans were handed a bumper allocation of 6,300 for the tie - far more than the 1,900 Rangers fans who will be in the stadium next week.
But they managed to get their hands on almost double their allocation and plenty of their supporters were dotted around the stadium.
Whether Rangers fans manage to find ways to get their hands on the same number of tickets is another matter.
Union fans also continued a long-standing protest about what they consider to be the 'plastic' nature of the newly-formed, heavily-backed, 11-year-old club by refusing to sing any songs or make any noise whatsoever until the 15th minute of the game.
It was a remarkable noise when the capital side finally found their voices as if a switch had been pressed.
RB play a 3-4-2-1 system which allows for plenty of flexibility and they were the better team at the start against the side three places and seven points worse off than them.
However, Union had three half chances within the first 15 minutes and Leipzig were prepared to allow the visitors have plenty of the ball.
And they were absolutely sliced apart when Union took a shock 25th minute lead. A quick break saw Christopher Trimmel's cross reached Sheraldo Becker, who wrongfooted Leipzig's former Liverpool keeper and captain Peter Gulacsi with a low shot across him.
The hosts finally showed what they could do before half time with a brilliant, rapid, one-touch display of football inside the Union box set up Hungarian ace Dominik Szoboszlai with a sitter, but he inexplicable passed the ball wide of target from point blank range.
It should have been tie over before the hour mark when Leipzig were once again taken apart on a counter-attack and Becker miskicked in front of an open goal as he slid in.
They were made to pay for that miss a few minutes later when Leipzig were awarded a VAR penalty after star French international Christopher Nkunku, who had been anonymous, was clipped in the box and Portuguese ace Andre Silva converted the spot kick.
The equaliser had manager Domenico Tedesco jumping around and urging the fans to make more noise and he spent a large chunk of the evening deep in conversation with his trusted No.2, former Celtic star Andreas Hinkel.
And they won it in injury time when sub Forsberg headed in a superb header to clinch an undeserved win at the death