Germany duo Kevin Krawietz and Tim Puetz sent their country into the Davis Cup semi-finals as they beat British pair Joe Salisbury and Neal Skupski in a tense doubles decider to earn a 2-1 victory on Tuesday.
Their 7-6(10) 7-6(5) win in Innsbruck sealed a remarkable comeback for the Germans, who avenged their defeat at the same stage of the competition by Britain in 2019.
Dan Evans had given Britain the lead by thrashing Peter Gojowczyk 6-2 6-1 in the first singles.
But Jen-Lennard Struff then kept Germany alive in the last-eight clash with an inspired performance to defeat world number 12 Cameron Norrie.
Struff won 7-6(6) 3-6 6-2 to send the tie into the deciding doubles rubber which proved a nerve-jangling affair.
The German pair saved four set points on their way to winning the first set in a remarkable tiebreak in which they claimed it on their fourth set point.
They were then 5-0 down in the second tiebreak of the match but reeled off seven consecutive points to seal the win and set up a semi-final against either Russia or Sweden in Madrid.
Germany only needed one match point with Puetz firing an unstoppable return down the line to spark celebrations among the players and support staff even if there were no fans inside the Olympiahalle because of Austria's Covid-19 lockdown.
"It's great, it's an unbelievable feeling," Germany captain Michael Kohlmann said. "We had super team chemistry."
Krawietz, twice a French Open doubles champion, said: "I am super happy that we're going to Madrid.
"The box was unbelievably loud -- it pushed us a lot and super happy to make it to the semi-finals."
While Krawietz and Puetz took the plaudits, it was Struff's performance that proved crucial.
The powerful world number 51 came out firing against the wall-like Norrie and used his huge groundstrokes and booming serve to move into a 4-1 ahead.
But Norrie, who made his debut at the ATP Finals after a remarkable year, ground his way back into the match and won five of the next six games to serve for the first set.
Struff broke back though and then saved two set points in the tiebreak from 4-6 down before edging a tense opener with a backhand winner on a set point of his own.
Norrie quickly re-grouped to level the match and set up a deciding set. It looked as though Struff was tiring as he was forced to battle to hold serve early in the decider but he broke Norrie's serve for a 4-2 lead and then held his own with an ace.
He then made it four games in a row to break Norrie's serve again and seal victory.
While the second singles was a ferocious scrap, the first had been all too easy for Evans who won in 55 minutes.
The Evans win proved the high point of the day for 2015 champions Britain who will wonder how they let the tie slip.
"They played well at the end of the second-set tiebreak, but we didn't," Salisbury, twice a doubles Grand Slam champion, told reporters. "I mean, we're 5-0 up, we should win the tiebreak, simple as that. We lost seven points in a row.
"There is no team in the world that we play that we should do that. Obviously we are gutted how it turned out, but also just very disappointed at the level, especially myself."
Serbia take on Kazakhstan on Wednesday with Russia versus Sweden on Thursday. The final is in Madrid on Sunday.