Deniz Undav scored in the eighth minute of stoppage time to snatch Stuttgart a point, pulling the home side level in a 3-3 draw with visiting Heidenheim on Sunday. 

The match swung wildly late, Heidenheim's Tim Kleindienst scoring two goals in two minutes before Undav's last-gasp equaliser.

Goals from Serhou Guirassy, his 23rd in 21 league games, and Angelo Stiller had third-placed Stuttgart in the driver's seat, but a 62nd-minute howler of an own goal from goalkeeper Alex Nuebel gave Heidenheim hope.

Nuebel caught and then dropped a tame Kleindienst header, before allowing it to trickle between his legs and into the goal. 

Kleindienst, who scored the crucial goal in the ninth minute of stoppage time which sent Heidenheim to the first division at the end of last season, scored in the 84th and 85th minutes to steal the lead. 

Kleindienst tapped in a Jan-Niklas Beste cross to level the scores and then headed in while unmarked in the box. 

Undav, who celebrated a first-ever call-up to the Germany squad in March, salvaged a point for the home side slamming a low drive into the bottom corner with the last kick of the game. 

Stuttgart missed a golden chance to close the gap with second-placed Bayern to one point, but still sit seven points clear of fifth placed RB Leipzig as they push for a return to the Champions League. 

Guirassy scored for the fourth straight game and is eight behind top scorer Harry Kane in the league this season. 

Heidenheim, who host Bayern next week, sit in 11th place and are all but certain of staying in the top division next season. 

Earlier on Sunday, Augsburg drew 1-1 at home with Cologne to regain seventh spot in the Bundesliga, and remain on course for a return to European football. 

Arne Maier gave the home side the lead after 18 minutes but Davie Selke's 33rd-minute goal levelled the scores for the visitors. 

Augsburg came into the game on a four-match winning streak and could qualify for Europe for the first time since 2015-16. 

Hovering dangerously close to the relegation places when the Danish coach Jess Thorup took over in October, Augsburg have improved rapidly. 

Depending on UEFA rankings and German Cup results, seventh spot may be enough for a Europa Conference League place. 

The point is cold comfort for Cologne, who are stranded in second-last place, six points from safety with seven games remaining.

In Sunday's late game, struggling Bochum face rock-bottom Darmstadt.