Andy Murray beat top-ranked Novak Djokovic 6-4, 4-6, 6-3 on Sunday in the Rogers Cup for his fourth tournament victory of the year and third title in the Canadian event.

The second-seeded Murray also won the tournament in 2009 and 2010. The Scot ended an eight-match losing streak against Djokovic since the 2013 Wimbledon final.

Djokovic, the champion in 2007, 2011 and 2012, lost for only the fourth time in 56 matches this year. The Serb failed in his bid to tie the ATP Tour record for consecutive Masters 1000 event titles at five.

Djokovic was playing his ninth straight final, a run that included championship victories over Murray this year in the Australian Open and Key Biscayne, Florida.

Murray cut Djokovic's series lead to 19-9.

In hot, muggy conditions at Uniprix Stadium, Murray served at 3-1 in the third, already up a break.. A ferocious baseline battle went to deuce 10 times and Murray fought off six break points to take the game.

Djokovic had two more break points in the final game, but Murray pounded two service winners and eventually won when Djokovic hit a groundstroke long after a brief rally.

Murray will move to No. 2, ahead of Roger Federer, in the new world ranking Monday.

In the doubles final, American twin brothers Bob and Mike Bryan beat Daniel Nestor of Canada and Edouard Roger-Vasselin of France 4-6, 6-3 10-6.