Rafael Nadal dumped two-time defending champion Novak Djokovic out of the ATP Rogers Cup in Montreal on Saturday night to earn a final date with Canada's Milos Raonic.
World number one Djokovic had headed into the semi-final riding a 13-match winning streak at the event and seeking a third straight title.
But Spanish fourth seed Nadal had other ideas and extended his perfect run on hardcourts this year to 9-0 with a 6-4 3-6 7-6 (7/2) victory over the top-seeded Serbian in a thrilling match lasting more than two and a half hours.
Raonic earlier edged compatriot Vasek Pospisil 6-4 1-6 7-6 (7/4) in two hours 16 minutes and will become the first Canadian man to break into the world's top 10 when the rankings are announced on Monday.
Both players had early break points in their first ATP World Tour meeting and it was Raonic who was finally able to convert, taking a 3-2 lead before closing out the first set.
Pospisil responded in the second set, though. He dropped just four points on serve and broke Raonic twice to level the match.
Raonic was twice two points from victory in the 10th and 11th games of the decider, but each time Pospisil showed his resolve and forced a tie-break. Mini breaks were traded before Raonic established a 6-4 lead and converted his first match point after forcing a volley error from the stranded Pospisil.