Two-time champion Andy Murray suffered a third-round upset Thursday, while fellow multiple Rogers Cup titlist Rafael Nadal reached the quarterfinals at this $2.887 million event.

Talented Latvian Ernests Gulbis handed the second-seeded Murray his first loss in 14 matches with a 6-4, 6-3 decision in 1 hour, 28 minutes on the hardcourts at Uniprix Stadium. Gulbis popped seven aces and broke Murray's serve three times, while the British star settled for only one break on Day 4.

The 2009 and 2010 Canadian Masters champion Murray was playing his first tennis since giving Great Britain its first male Wimbledon singles titlist in 77 years last month. He had been riding a 13-match overall winning streak.

In the final match of the night, world No. 1 and top-seeded Novak Djokovic rallied from a first-set loss to take a 2-6, 6-4, 6-4 victory over Uzbeki Denis Istomin.

Djokovic is the reigning two-time and three-time overall Rogers Cup champion. The Serbian star beat Frenchman Richard Gasquet in last year's final in Toronto, as this tournament shifts between Montreal and Toronto each year.

Gasquet, a seventh-seed, moved to the quarterfinals as he went the distance against ninth-seeded Kei Nishikori of Japan for a 1-6, 6-3, 6-3 victory.

Meanwhile, the fourth-seeded former world No. 1 star Nadal rallied from 0-3 down in the second set to hold off 15th-seeded 6-foot-8 Pole Jerzy Janowicz 7-6 (8-6), 6-4 in 1 hour, 49 minutes at this Masters 1000 tournament. The big-serving Janowicz had the first set on his racquet, serving at 6-5.

The French Open king Nadal is now 8-0 on hardcourts this year. He captured the Indian Wells Masters event back in March.

Nadal won this Canadian Masters tournament in 2005 and 2008. His quarterfinal opponent on Friday will be Aussie qualifier Marinko Matosevic, who outlasted Frenchman Benoit Paire 7-6 (9-7), 6-7 (10-12), 6-3 on Thursday.

Another upset came when Canadian wild card Vasek Pospisil upended fifth-seeded Czech Tomas Berdych 7-5, 2-6, 7-6 (7-5).

Canadian Milos Raonic, the 11th seed, took down Argentine sixth-seed Juan Martin del Potro in straight sets 7-5, 6-4. Del Potro was last week's Washington, D.C., champion and the 2009 Montreal runner-up to Murray.

In a match between a pair of Russians, unseeded Nikolay Davydenko took out qualifier Alex Bogomolov Jr. 6-4, 6-3.

The 2013 Rogers Cup champion will earn $547,300.