BERLIN (AP) -- Bayern Munich defeated Borussia Dortmund 4-3 on penalties in the German Cup final on Saturday to seal the club's 11th domestic double and give coach Pep Guardiola a winning send-off.
Bayern goalkeeper Manuel Neuer saved Sven Bender's spot kick and Sokratis Papastathopoulos missed the next for Dortmund.
Dortmund goalkeeper Roman Buerki saved Joshua Kimmich's penalty but Thomas Mueller kept Bayern in control, and Douglas Costa scored the decisive spot kick.
It's Bayern's 18th German Cup win and the club's third in four seasons.
Guardiola, who is leaving after three years in Munich to join Manchester City, also won the trophy in his first season in charge, in 2014.
Dortmund, which last won the title in 2012, has now lost three straight finals after defeats to Wolfsburg in 2015 and the loss to Bayern in 2014.
Both sides missed chances to win before the shootout in what was a tense encounter contested to the limits of the players' endurance, though Buerki was by far the busier goalkeeper.
Pierre-Emerick Aubameyang missed a great chance to win it for Dortmund with five minutes remaining when he blazed over from close range on a counterattack, while Robert Lewandowski had come closest for Bayern.
Dortmund captain Mats Hummels had to go off with more than 10 minutes remaining in regular time after playing his last game for the club. The Germany defender is joining Bayern next season.
There were few opportunities for either side in the first half with marking tight, leaving space at a premium. Jerome Boateng tried a long ball for Lewandowski but the striker was hustled off the ball by his former teammates.
Costa tested Buerki in the 33rd - the first save either goalkeeper had to make - and Hummels managed to clear the rebound as Mueller's penalty appeals were waved away. TV replays showed he fell easily under Sokratis' challenge.
Bayern winger Franck Ribery, who was having a poor game, was lucky to escape with just a yellow card after grabbing Gonzalo Castro in the face after a tussle between them. Castro was also booked.
Bender had a good chance as Dortmund finished strongly but he didn't connect properly with the ball.
The second half began under a cloud of black smoke after fans in the Dortmund block set off flares and firecrackers.
More chances presented themselves with both sides taking more risks. Aubameyang blazed over after he was set up by Reus, Boateng cleared off the line, Lewandowski fired just over, and Neuer was quick out of his goal to intercept a dangerous ball for Aubameyang.
Buerki did brilliantly to stop Ribery's deflected shot with 15 minutes remaining, shortly before Hummels went off. There were more chances for both sides to find a winner but they weren't taken.