Andy Murray ended a long drought against Novak Djokovic when he beat the Serbian 6-4 4-6 6-3 in a draining final of the Rogers Cup.
The British right-hander ended an eight-match, 25-month losing streak against Djokovic and improved from third to second in the world rankings.
He had not beaten the world number one since the 2013 Wimbledon final.
Djokovic, who lost for just the fourth time this year, had won 12 consecutive Masters Series finals since he fell to Roger Federer in Cincinnati in 2012.
1. Novak Djokovic (Serbia)
2. Andy Murray (Britain)
3. Roger Federer (Switzerland)
4. Kei Nishikori (Japan)
5. Stan Wawrinka (Switzerland)
6. Tomas Berdych (Czech Republic)
7. David Ferrer (Spain)
8. Rafa Nadal (Spain)
9. Marin Cilic (Croatia)
10. Milos Raonic (Canada)
Murray and Djokovic embraced at the net after a three-hour battle of attrition that left them exhausted as courtside temperatures reached 40C.
"Everybody wants me and Novak to dislike each other and people always try to stir things up between us," Murray, 28, said in a courtside interview.
"It's impossible to be extremely close when we're playing in these sorts of matches because it's so mentally challenging and physically demanding and you need to try to still have that competitive edge as well.
"But it's not easy, not only because we get on but because he's bloody good, he's number one in the world and he hasn't lost in a Masters Series this year. To win against him is extremely tough."
The vanquished Djokovic said sub-par serving had cost him the match.
"Andy is deservedly a winner today on the court," he said.
"I thought what made the difference was his serve and my serve. I didn't serve well the first set and a half."
|Bencic had beaten Ivanovic, Wozniacki and Serena en route the final [AP]
Elsewhere, Swiss teenager Belinda Bencic capped a fairytale run to the Rogers Cup women's title when a distressed second seed Simona Halep was forced to retire from the final trailing 7-6(5) 6-7(4) 3-0.
Bencic needed nearly two hours and 30 minutes on a sweltering centre court to see off a determined Halep and claim the biggest title of her young career, putting down a marker as a player to watch at the US Open.
The 18-year-old's Rogers Cup debut was a memorable one as Bencic's drive to the title included a stunning semi-final upset of world number one Williams and two former number ones in fourth seed Caroline Wozniacki and fifth seed Ana Ivanovic.
Halep produced a gutsy effort but the Romanian appeared in trouble right from the start as she struggled with the heat and a sore left thigh that required treatment throughout the match, including a medical time out when medical staff checked her blood pressure.
Down 5-3 in the second and with Bencic serving for the match, the 23-year-old dug deep into her reserves and forced the set to a tiebreak which she won to thundering applause from the sun-baked crowd.
But the effort to force a third set proved too much.
Trailing 3-0, Halep went to her chair during the changeover then quickly got up and walked over to Bencic and shook hands, telling her she could not continue.