Russia prevailed in a deciding doubles tie-break in an epic contest with Serbia a day earlier but was unable to repeat the trick as Denis Shapovalov and Vasek Pospisil made history for Canada.
The duo secured a 6-3 3-6 7-6 (7-5) triumph over Andrey Rublev and Karen Khachanov in Madrid, despite Pospisil having received treatment on a shoulder injury prior to the final set.
It marked the culmination of a memorable tussle, in which Russia struck first when Rublev earned a fourth singles victory of the week with a 6-4 6-4 win over Pospisil.
That meant Shapovalov had to defeat Khachanov to keep Canada's hopes alive and things were not looking good when the Russian raced into a 4-1 lead.
Shapovalov rallied brilliantly to take the opener, but succumbed when serving to stay in the second at 5-4 down.
A tense decider went the way of Shapovalov, who celebrated a 6-4 4-6 6-4 victory in a match featuring 73 unforced errors.