Bayern Munich were knocked out of the German Cup by lower-league opposition for the first time since 2004 as they were stunned by second-tier Holstein Kiel in a penalty shootout.
The holders were seconds away from victory until Hauke Wahl scored via his shoulder, deep in stoppage time.
Bayern led the second-round tie twice, through Serge Gnabry’s opener and Leroy Sane’s brilliant free-kick.
Fin Bartels’ drilled shot had levelled for Kiel in the first half.
The first 10 penalties in the shootout were scored, but Kiel goalkeeper Ioannis Gelios denied Marc Rota, and veteran Bartels scored the winning kick.
This is the first time in 12 years that Bayern have failed to reach the semi-finals. Their last defeat by a lower-league team was in 2003-04 when they lost 2-1 to second division side Alemannia Aachen in the quarter-finals.
Kiel, the 1912 German champions, have never played in the Bundesliga in its current format, and are third in the second tier.
Bayern, whose dreams of retaining their treble are over, lost 2-1 to Borussia Monchengladbach in the league at the weekend but still top the Bundesliga.