Montreal - Novak Djokovic and Rafael Nadal were made to work for their wins on Thursday as the elite seeds struggled into the quarter-finals of the Montreal Masters.
Wimbledon champion Andy Murray failed to advance as he slumped to a shock 6-4, 6-3 loss to Latvia's Ernests Gulbis.
Top seed and three-time Canadian champion Djokovic dropped the opening set before swinging back into form to earn a 2-6, 6-4, 6-4 win over 66th-ranked Denis Istomin. Nadal subdued Poland's Jerzy Janowicz 7-6 (8/6), 6-4.
It was a huge day for host Canada, with two players into the quarter-finals for the first time since 1989.
Wild card Vasek Pospisil shocked fifth seed Tomas Berdych 7-5, 2-6, 7-6 (7/5) while 11th seed Milos Raonic blasted former US Open champ Juan Martin del Potro 7-5, 6-4.
Raonic, treated for a pinched nerve in his neck for 12 minutes in the first set, also got a break when the chair ruled a ball dead on a point in the eighth game of the second set despite his foot brushing the net.
The call led to a break of del Potro for 4-4 a few games from the end and left the Argentine angry.
Raonic won 79 percent of his first-serve points and fired a dozen aces to just one for del Potro.
Djokovic was caught by surprise in his match with Istomin as the Uzbek broke twice to win the opening set. It was uphill for the remainder of the two-hour, seven-minute match before Djokovic salted away the win with a ninth ace.
Murray, who had won all five previous meetings with the colourful Gulbis, saw his 13-match winning streak snapped.
The world number two now heads to Cincinnati for a final chance to tune his hardcourt form ahead of his US Open title defence starting in New York on August 26.
"I'm obviously disappointed not to win," said Murray. "I hit the ball better today than I did yesterday, I just got broken at the end of both sets.
"There's obviously some things for me to work on, but I think that will come with playing matches."
Gulbis went through in less than 90 minutes with three breaks of Murray, twice a champion in Canada.
Gulbis, ranked 38 in the world, reached his third career quarter-final at the Masters 1000 level but first since Madrid in 2010 where he lost to Roger Federer.
Fourth seed Nadal, playing his first event in seven weeks since losing in the first round at Wimbledon to Belgian Steve Darcis, needed one and three-quarter hours to see off Polish 15th seed Janowicz, a Wimbledon semi-finalist.
"I had a very good victory today against a very difficult opponent, I'm very happy," said Nadal, winner of seven titles this season.
"I did a few things well and there are a few things I need to improve a little bit more.
"In general I'm pleased with the way I played, it's a great victory for me, an important one."
The victory was a major contrast to Nadal's opening match, where he lost just two games against Canada's Jesse Levine.
Nadal, the French Open champion and with seven titles in 2013, has now won 45 matches since his return in February from a seven-month injury lay-off.
The Spaniard will square off on Friday against Australian qualifier Marinko Matosevic, who needed two and a half hours to defeat Frenchman Benoit Paire, 7-6 (9/7), 6-7 (10/12), 6-3.
Results on the fourth day of the Montreal Masters on Thursday (x denotes seed):
Rafael Nadal (ESP x4) bt Jerzy Janowicz (POL x15) 7-6 (8/6), 6-4
Milos Raonic (CAN x11) bt Juan Martin del Potro (ARG x6) 7-5, 6-4
Ernests Gulbis (LAT) bt Andy Murray (GBR x2) 6-4, 6-3
Marinko Matosevic (AUS) bt Benoit Paire (FRA) 7-6 (9/7), 6-7 (10/12), 6-3
Vasek Pospisil (CAN) bt Tomas Berdych (CZE x5) 7-5, 2-6, 7-6 (7/5)
Nikolay Davydenko (RUS) bt Alex Bogomolov (RUS) 6-4, 6-3
Richard Gasquet (FRA x7) bt Kei Nishikori (JPN x9) 1-6, 6-3, 6-3