Canada will face Australia in the Davis Cup final on Sunday after beating Italy in the semi-finals.
Italy's Lorenzo Sonego defeated Denis Shapovalov 7-6 (7-4) 6-7 (5-7) 6-4 in an opening singles rubber lasting three hours and 15 minutes in Malaga.
World number six Felix Auger-Aliassime levelled the tie for Canada with a 6-3 6-4 victory over Lorenzo Musetti.
He and Vasek Pospisil then won the deciding doubles 7-6 (7-2) 7-5 against Matteo Berrettini and Fabio Fognini.
Auger-Aliassime was a late swap into the doubles team, replacing compatriot Shapovalov after his singles defeat.
"We knew coming this week that we could make some changes depending on how singles went and I just feel like the whole team connected around this idea and there was no ego in the wrong places," said Auger-Aliassime.
"Everybody just has the clear idea of the main goal, which is lifting the cup tomorrow."
Pospisil said: "Davis Cup is always a wild week and I would say the most fun, as a player. We got more to do."
It is the second time Canada have reached the Davis Cup final, having first done so in 2019 when they lost to Rafael Nadal's Spain.
Australia - the 28-time champions of the tournament - reached their first Davis Cup final since 2003 on Friday with victory over Croatia.