A fighting performance from Stuttgart earned them a 2-2 draw against Bayern Munich, giving Pellegrino Matarazzo's team a chance of avoiding a relegation play-off with one round of matches remaining in the Bundesliga.

Goals from Tiago Tomas and Sasa Kalajdzic either side of strikes from Serge Gnabry and Thomas Muller secured a point at the Allianz Arena, while both teams missed other gilt-edged chances to seal a win in an exciting contest on Sunday.

Stuttgart still sit in 16th place, three points behind Hertha Berlin in 15th, but have a significantly superior goal difference, and so will be safe if they can beat Cologne at home next week and Hertha lose at Borussia Dortmund.

Already crowned champions Bayern – who had Kingsley Coman sent off late on – fielded a strong team and had plenty of opportunities, but some chaotic defending provided Stuttgart with enough chances to take a point.

Bayern 2-2 Stuttgart

Stuttgart took a surprise lead in the eighth minute when Kalajdzic flicked a header into the path of Omar Marmoush, whose low cross from the right was powerfully side-footed into the roof of the net from the edge of the box by Tomas.

Bayern were level in the 35th minute after the ball was worked out to Gnabry, who cut inside Borna Sosa before firing a shot across goal that appeared to be going in anyway before it was inadvertently sent over the line by Konstantinos Mavropanos.

Julian Nagelsmann's men were then ahead just before the break as Muller took a pass from Dayot Upamecano and turned beautifully before prodding the ball into the net low to the goalkeeper's left.

The relegation strugglers were level seven minutes into the second half after Kalajdzic rose above Tanguy Nianzou to thunder in a header off a dinked cross by Sosa, and Austria international should have put Stuttgart in front moments later when played in on goal, but he slid a tame effort into the hands of Neuer.

Substitute Philipp Forster also had an opportunity to be a hero just after coming on but he dragged his left-footed effort wide after getting on the end of a Kalajdzic flick, while Robert Lewandowski had his first real chance of the game with 14 minutes remaining, but saw his shot deflected onto the bar.

The hosts also lost Coman to a red card in stoppage time after the winger reacted to a Mavropanos challenge as the game ended all square.