Nicolas Hofler scored a stunning goal as Freiburg came from behind to claim a shock away win over Bayern Munich in the quarter-finals of the German Cup on Tuesday. 

Bayern took the lead 19 minutes into the game when Dayot Upamecano headed home from a Joshua Kimmich corner.

But Freiburg hit back to level the score with a spectacular strike less than eight minutes later.

Kingsley Coman's half-hearted clearance fell to Hofler 30 yards from goal. The Freiburg midfielder controlled the ball with his first touch before arrowing it into the top corner with his second.

Bayern twice came close to restoring their lead. Thomas Muller was denied by a goal-line clearance from Matthias Ginter. Benjamin Pavard later headed the ball onto the Freiburg crossbar.

But the Bundesliga leaders were hit by a late sucker-punch after it had looked like the game was heading for extra time.

Jamal Musiala blocked a shot from Hofler using his arm and Lucas Hoeler converted the resulting penalty kick in the third minute of added time to knock Bayern out.

Bayern have now failed to reach the semi-finals of the German Cup in each of the last three seasons.

Tuesday's game was only Thomas Tuchel's second match in charge of Bayern.

The former Chelsea boss had started his reign with a 4-2 win over Borussia Dortmund on Saturday.

More must-reads:

TODAY'S BEST
USA Hockey adds Wild head coach to 4 Nations coaching staff
Aaron Rodgers skips mandatory minicamp without permission from Jets
Patriots' Matthew Judon opens up about 'tantrums' during contract negotiations
Chiefs DE released from hospital after medical scare
49ers' Kyle Shanahan shares what impresses him about Brock Purdy
Former Rangers, Sharks coach linked to Penguins staff
NFL insider addresses reports on Steelers' Russell Wilson, Justin Fields
Report: Suns to hire two-time Pac-12 Coach of the Year as assistant
Pundits 'disappointed' with 'terrible' decision to omit Caitlin Clark from Olympic team
Panthers claw way to 2-0 Stanley Cup Final lead with win over Oilers
Dan Hurley's decision gives UConn another win, lets fans exhale
USMNT coach Gregg Berhalter under fire as Copa America draws near
Four hot issues ahead of Paris Olympics
Kyrie Irving is letting Luka Doncic down in NBA Finals
Forecasting a potentially surprising cut for every AFC team
Forecasting a potentially surprising cut for every NFC team
Five underrated MLB trade chips contenders should consider targeting
Jordan Love believes Packers 'don't have to have a No. 1 receiver'
Week 16 NASCAR power rankings: Kyle Larson reclaims frontrunner status with Sonoma win
U.S. Open: Five players you should have your eye on at Pinehurst