Montreal, Canada, 9 August 2013 | AFP

Australian Marinko Matosevic has continued his good run of form to set up a quarterfinal showdown with Rafael Nadal at the Montreal Masters.

Yet in a big shock on Thursday, Wimbledon champion Andy Murray slumped to a 6-4 6-3 loss to Latvia’s Ernests Gulbis.

Having posted easy victories over Germans Benjamin Becker and Tommy Haas in the earlier rounds, world No.74 Matosevic had a tougher task on Thursday, needing two-and-a-half hours to defeat Frenchman Benoit Paire 7-6(7) 6-7(10) 6-3.

The wildly inconsistent Paire produced 16 aces and a dozen double-faults while saving eight of 13 break points.

Coming off his quarterfinal run at the Washington Open last week, qualifier Matosevic will now get the chance to go one better when he squares off with Nadal on Friday.

The fourth-seeded Spaniard survived a scare from Wimbledon semifinalist Jerzy Janowicz before reaching the quarters with a 7-6(6) 6-4 win.

Nadal, playing his first event in seven weeks since losing in the first round at Wimbledon to Belgian Steve Darcis, had to fight to get the job done in one-and-three-quarter hours against the feisty Polish 15th seed.

The win 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.

Nadal’s ninth Canadian appearance featured a 68-minute opening set in which the fourth seed saved three set points in the 10th game to level at 5-5.

The Spaniard dropped serve a game later only to get it back to take the set into a tiebreaker.

In the decider, Nadal recovered from 2-5 down and finally ended the duel on his second chance, a stunning overhead reverse backhand which landed at Janowicz’s feet and went through his legs thanks to massive spin.

Nadal’s relief was short-lived with the Spaniard going down a break in the second set before finally squaring it at three games apiece.

Nadal, the champion in Canada in 2005 and 2008, squeezed out victory on the first of two match points with his sixth ace.

Gulbis, ranked 38th in the world, reached his third career quarterfinal at the Masters 1000 level but first since Madrid in 2010 where he lost to Roger Federer.

“I struggled at the start of the first set from the baseline, but then I got more aggressive and took my opportunities,” said Gulbis, who next faces either Juan Martin del Potro or Milos Raonic.

“I started this year at 150 in the world, I was struggling. But slowly and surely I am getting to where I belong.

“I want to crack the top 20. Then, one or two big wins and you are in the top 10.”

World number two Murray 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 26 August.

Top seed Novak Djokovic was involved in the night match, taking on Denis Istomin of Uzbekistan.