Canada will play Italy in the Davis Cup semi-finals after coming from behind to defeat Germany 2-1 in Malaga.
Initially a wildcard for the finals as the highest-ranked losing nation in the qualifiers, the 2019 runners-up are through to the last four for the second time in three years - and fourth time overall.
Felix Auger-Aliassime overcame Oscar Otte in straight sets - condemning him to a fourth straight singles defeat - to set up a doubles decider and cancel out Denis Shapovalov's earlier loss to Jan-Lennard Struff.
Shapovalov and Vasek Pospisil appeared in trouble when they lost the opening set 6-2 against Tim Puetz and Kevin Krawietz, who had won all eight Davis Cup matches when paired together.
But the Canadian duo, who hit a combined 11 aces during the contest, rallied to force a deciding set, which they took 6-3 to inflict a first defeat on their opponents.
Comeback Complete— Davis Cup (@DavisCup) November 24, 2022
What a performance from @VasekPospisil and @denis_shapo who secure a stunning 2-6 6-3 6-3 to move Canada into the semi-finals#DavisCup #byRakuten #Final8 | @TennisCanada pic.twitter.com/qV1FL2Q3oz
Earlier in the day, Italy also came through a deciding doubles match to beat the USA and secure their first semi-final appearance since 2014.
Despite missing the injured Jannik Sinner and Matteo Berrettini, the Italians were appearing in their first quarter-final for six years, and they made a strong start with Lorenzo Sonego hitting 17 aces on the way to defeating Frances Tiafoe 6-3 7-6 (8-6).
Targeting only their fourth semi-final since 2007, 32-time winners USA rallied with Taylor Fritz overcoming Lorenzo Musetti in straight sets to force the first deciding double match of the finals.
There, just one break per set was enough for Simone Bolelli and Fabio Fognini to beat Tommy Paul and Jack Sock 6-3 6-3, and send the 1976 champions through.