Bayern went 13 points clear in the table on Wednesday with a dramatic 2-1 win as Thiago Alcantara's stunning 93rd-minute volleyed bicycle-kick saw off a spirited Stuttgart challenge and extended Bayern's record unbeaten league run out to 43 matches.

The Bavarians last lost in the German league back in October 2012 and this season's German title race is widely considered to be over with more than three months still to play.

But Bayern did not have things their own way in Stuttgart, falling behind to a Vedad Ibisevic goal after 29 minutes before Claudio Pizarro equalised 14 minutes from time, then Alcantara volleyed the winner in added time.

Guardiola says his side needed a tough league match to remind them that nothing is yet decided, despite their massive lead.

"If a team doesn't lose 43 times and everyone says that the Bundesliga (title-race) is over and the championship is secured, it's not easy for the player's mentality," said Guardiola.

"To always win, win, win -- I know how difficult that is."

Bayern have now won all of their last 11 league games and having won 14 titles in four years as Barcelona coach, Guardiola is familiar with the luxury problem of motivating a side who are used to winning.

The European champions were issued with a wake-up call earlier this month when a experimental side lost 3-0 at Red Bull Salzburg in a friendly.

"Sometimes we need a warning, you need a problem like we had in Salzburg or the first-half in Stuttgart to react.

"A game like that is better than a three or four nil victory."

Having broken or equalled 25 Bundesliga records last season, Bayern are again setting new best marks.

A 13 point lead after 18 matches is a new Bundesliga record and the question is whether Guardiola's side will better last season's record for the earliest confirmed title win on April 6 which they achieved with six games to spare.

Stuttgart were just seconds from taking a deserved point from the game and their players were left pole-axed on the pitch after succumbing to their third straight defeat, their sixth loss in eight matches.

"Every opponent wants to be the first to beat us and we weren't as consistent as usual," said Bayern captain Philipp Lahm.

But match-winner Alcantara summed up the defending title-holders mentality.

"That's Bayern Munich, we tried everything we could to get the win," said the 22-year-old, who joined Bayern from Barcelona last July and scored his first Bundesliga goal in Stuttgart.