Two goals in the first 15 minutes seemed to spell doom for the visitors, but they made a game out of it with a second-half penalty, before Kroos' late goal settled mattersBayern Munich maintained their place atop the Bundesliga with a 3-1 victory over Mainz at the Allianz Arena on Saturday.
Mario Mandzukic slotted the hosts into the lead after only two minutes of play, before Bastian Schweinsteiger doubled their advantage with a header just before the quarter hour mark.
What threatened to be a demolition job never occured though, as despite large spells of Bayern pressure, Mainz were able to work themselves back into the game.
Adam Szalai handed the visitors hope with a penalty in the 59th minute, but there was no more to come from the visitors, as Kroos scored with a well-taken volley in stoppage time to wrap up the points for the hosts.
There was no place in the matchday squad for Arjen Robben and Frank Ribery, with both players sitting out the match after picking up injuries last week. However, Bayern barely noticed the absence of their wing wizards, as they raced into the lead after only two minutes.
Thomas Muller did the hard work, racing onto a loose ball at the edge of the box and squaring to Mandzukic, who made no mistake in front of an unguarded net.
The home side looked to move forward through the flanks, as they peppered the Mainz goal with a host of crosses from out wide. This avenue of attack brought reward in the 13th minute as Schweinsteiger put them two goals ahead.
Badstuber was the supplier, whipping in an inch-perfect cross into the heart of the area that the midfielder attacked, unmarked, to head home.
All signs pointed to a thrashing in the making, but Bayern did not seem in any rush to add to their two goal cushion, instead finding comfort in keeping the visitors trapped chasing shadows in their own half, without really finding the cutting edge of the opening exchanges.
The inevitability of their situation perhaps prompted Thomas Tuchel to make a double switch in the 37th minute, as Szalai and Elkin Soto were thrown on for Marcel Risse and Marco Caligiuri in a bid to provide more thrust up front.
The visitors were able to raise their game slightly, but despite fashioning a few relatively promising openings, they never managed to call Manuel Neuer into action as the first half drew to a close.
Their improvement continued into the second half, as they were able to cause some problems in the Bayern back four with spells of sustained pressure. And with just under an hour gone, their endeavour was rewarded as a moment of carelessness from Dante handed them a lifeline.
The Brazilian was late in challenging Baumgartlinger inside the area, leaving the referee with little choice but to award a penalty. Szalai sent Neuer the wrong to bring the visitors to within a goal.
Mainz’s tails were up as they persisted in attacking Bayern, but the hosts, despite their unsteady defense, always posed a danger on the counter. Mandzukic struck the woodwork after a scramble in the box, before both Muller and Shaqiri hit the side netting after getting on the end of a pair of promising breaks.
The Switzerland international was withdrawn soon after, with Javi Martinez coming on to solidify the midfield for the closing stages.
Claudio Pizarro also came off the bench late on, and almost added a third after being put clean through, but Wetklo was able to block his finish.
The third goal would come though, and it arrived via the boot of Kroos, who volleyed home expertly at the far post from Javi Martinez's cross to add gloss to the scoreline with the last kick of the game.