Berlin: Bundesliga pacesetters Bayern Munich twice squandered the lead and needed an 88th-minute winner from Robert Lewandowski to beat bottom club Paderborn 3-2 in a thrilling game on Friday.
The Bavarians, who visit Chelsea in their Champions League last 16, first leg on Tuesday, have 49 points, four points clear of second-placed RB Leipzig, who are at Schalke 04 on Saturday.
"Paderborn challenged us until the very last second," Bayern coach Hansi Flick told reporters after his team's eighth win in their last nine league games.
"We were not precise enough in our attacking game and it was a hard match for us. In the second half we tried everything after the 2-2 to get the three points. I'm satisfied with the result. But the Chelsea game will be a completely different one."
Bayern, who had expected a far easier dress rehearsal ahead of their trip to London next week, went ahead with a Serge Gnabry effort in the 25th minute.
The visitors, however, had warned they would not be piling bodies into defence and they proved it when they levelled a minute before the break.
Bayern keeper Manuel Neuer spectacularly failed to clear the ball after racing out of his box and Dennis Srbeny slipped it through his legs and went on to score.
Bayern had their opponents on the backfoot after the break but Paderborn keeper Leopold Zingerle twice denied Lewandowski with superb saves and also stopped Kingsley Coman from scoring.
Poland forward Lewandowski finally broke the deadlock in the 70th with a tap-in after fine work from Gnabry, but the joy did not last long with Sven Michel finishing off another quick break that caught Bayern's defence napping five minutes later.
Lewandowski, however, came to the rescue once more, firing home with two minutes left from another Gnabry assist for the winner and his 25th goal in 23 league matches.