It wasn’t until the 83rd minute that Bayern equalised.
After a well-coordinated move down the left flank, Jamal Musiala passed into the middle for Sane.
The last minutes continue to be fascinating.
Bayern kept finishing, but Sommer stood his ground for the rest of the game.
Two long shots from Alphonse Davies and Benjamin Pavard failed to beat Sommer.
De Ligt was also helpless when a close-range volley hit the visitors’ goalkeeper.
The 1-1 draw with M’gladbach snapped Bayern’s winning streak from the start of the season, having 10 points from four rounds.
They remained in the lead, but just ahead of Union Berlin on goal difference.
Freiburg, Hoffenheim and Dortmund finished next with the same nine points.