MADRID -- The revamped Davis Cup will reach its climax on Sunday, with either Canada celebrating a historic first title or Spain lifting the trophy for the sixth time in front of its fans.
After two thrilling semifinals decided in tiebreakers of the doubles matches on Saturday, Spain outlasted Britain and Canada upset Russia to play for the title of the new Davis Cup Finals, the World Cup of tennis.
Two-time champion Russia was trying to make it to the final for the first time in 12 years.
Rublev put the Russians ahead defeating Pospisil 6-4, 6-4 in the first singles, and Shapovalov evened the tie by downing Khachanov 6-4, 4-6, 6-4.
In the doubles, the Canadians trailed 3-0 in the third-set tiebreaker but rallied and converted their second match point.
"Today was an incredible match," Pospisil said. "I mean, the doubles, just with the buildup, obviously, getting to this moment the last five days, I mean, it took a lot of emotions even just to get to this match.
"It's pretty incredible to make the finals, first time in history for Canada. To do it the way it happened was pretty special to be a part of."
Pospisil and Shapovalov have played all of the matches for Canada, which won Group F by defeating former champions Italy and the United States, then eliminating another former champ, Australia, in the quarterfinals. Canada had never beaten the U.S. or Australia in the Davis Cup.
The 150th-ranked Pospisil did not drop a set in singles this week until his loss to Rublev. The 20-year-old Shapovalov, No. 15 in the world, also won three of his four singles.
Russia, which won its Davis Cup titles in 2002 and 2006, also used only Khachanov and Rublev.
"It hurts, of course, that we lost today, but overall we gave our best,'' Khachanov said. "We cannot complain that we didn't do something.''
The 23rd-ranked Rublev won all four of his singles in Madrid, with a 2-2 doubles record.
Spain beats Britain to reach first Davis Cup final since 2012
Rafael Nadal won his singles and doubles matches to lead Spain to a 2-1 comeback win over Britain, putting the hosts in the Davis Cup Finals for the first time since 2012.
"It was an exciting match, almost dramatic,'' Nadal said. "We played at a high level. We knew the victory would come if we played with determination and hope.''
Kyle Edmund gave Britain the lead with a 6-3, 7-6 (3) win over the 38-year-old Lopez in the first singles, then Nadal evened the semifinal by cruising past Daniel Evans 6-4, 6-0 for his 28th straight Davis Cup singles victory.
The top-ranked Nadal has won all six of his matches this week.
Britain did not use Andy Murray for the third straight day. The three-time Grand Slam champion won his opening singles but said he was not in his best shape.
Little separated the teams in the doubles on Caja Magica's center court, with neither capitalizing on their break opportunities. Both sets lasted more than an hour.
Spain prevailed in both tiebreakers before a boisterous home crowd after Britain squandered four set points in the second set, including three in the tiebreaker.
"We had our chances at the end,'' Jamie Murray said. "That one will hurt for a little while, I think.''
Spain converted on its second match point.
"The crowd was amazing,'' Nadal said. "It's hard to describe the feeling of playing in a team competition in front of our fans on this court. It was incredible.''
Spain has been playing without Roberto Bautista Agut, who had to leave the team because of the death of his father.
The British team complained that Spain made a late change for the first singles match, citing an injury to replace Pablo Carreno Busta by Lopez.
"We've done really well to make the semis,'' Skupski said. "It's unfortunate we couldn't go a step further, but we'll be back here next year and try and go a bit further.''
All four semifinalists are secured in next year's edition of the Davis Cup Finals, which is the result of a 25-year partnership between the International Tennis Federation and the investment group Kosmos to make the team competition more attractive and lucrative.
The Associated Press contributed to this report.