The win was the last game for Bayern coach Jupp Heynckes, who will be replaced by Pep Guardiola.
Joern Pollex/Getty Images

Bayern Munich beat Stuttgart 3-2 to seal the club's first treble by winning the German Cup on Saturday in Jupp Heynckes' last game in charge.

Mario Gomez scored twice and Bayern became the first German side to win a treble of domestic league, cup and European Cup, and only the seventh team overall to achieve the feat.

Thomas Mueller opened the scoring with a penalty in the 37th minute, Gomez made it 2-0 three minutes into the second half, and the former Stuttgart striker added his second in the 61st.

Martin Harnik pulled one back in the 71st, and set up an exciting finale when he scored again with 10 minutes remaining, but Bayern held on to complete the most successful season for a German club.

"It doesn't get any better,'' former Bayern star Franz Beckenbauer said. "The Stuttgarters made it exciting for us. But when you look at the 90 minutes, the win was deserved. No other team managed to win all the titles before. This is the best Bayern team ever. I can't remember a season that went any better. This is the absolute highlight.''

Bayern's record 16th German Cup comes one week after it beat Borussia Dortmund 2-1 in London to win the Champions League and eight after it broke a host of records in claiming its 23rd Bundesliga title, leaving incoming coach Pep Guardiola with a daunting challenge to match Heynckes' achievements this season.

"It's unbelievable what the team and coach have achieved over the whole season,'' Bayern captain Philipp Lahm said. "They were tough months but now we're being rewarded for them.''

Only Celtic in 1967, Ajax in 1972, PSV Eindhoven in 1988, Manchester United in 1999, Guardiola's Barcelona in 2009, and Inter Milan in 2010 previously won the treble.

Bayern began by bossing possession. Arjen Robben's effort was deflected just wide by Stuttgart `keeper Sven Ulreich, who was to make a number of saves later in the game.

Alexandru Maxim went closest for Stuttgart, shooting just wide after he was set up by Ibrahima Traore.

It looked like Robben was denied a clear penalty in the 31st, when Stuttgart captain Serdar Tasci missed the ball and kicked the Bayern winger instead. Referee Manuel Graefe gave a corner.

Graefe pointed to the penalty spot five minutes later, however, when Traore bundled over the inrushing Philipp Lahm, and Mueller duly converted.

Gomez scored from close range after the break, when Lahm's cross rebounded off his right shin to his left leg, back to his right and in.

Mueller crossed for Gomez's second. Heynckes then took the Germany striker off to a great reception after what may have been his last Bayern game.

Harnik scored what looked like a consolation with a fine header from substitute Gotoku Sakai's cross, but it was game on when the Austrian scored again, blasting past Neuer at the second attempt after the goalkeeper saved his first effort.

Stuttgart threw everything forward to force extra time, but Neuer wasn't to be beaten again.

"It was a super season,'' said Bayern defender Daniel van Buyten. "We played very well from the beginning. Last year a title was missing. Now we're happy that we can celebrate.''

SI Apps
We've Got Apps Too
Get expert analysis, unrivaled access, and the award-winning storytelling only SI can provide - from Peter King, Tom Verducci, Lee Jenkins, Seth Davis, and more - delivered straight to you, along with up-to-the-minute news and live scores.