Andy Murray will remain number one for another week after 18-year-old Canadian Denis Shapovalov stunned Rafael Nadal at the Rogers Cup.
The top seed needed to reach the semi-finals to replace the injured Murray at the top of the rankings this week but was beaten in a thrilling last-16 tie against the world number 143.
Shapovalov delighted the home crowd late in the night in Montreal as he recorded a 3-6 6-4 7-6 (7/4) victory in two hours 45 minutes.
The youngster responded impressively to Nadal easing through the first set to force a decider, where Shapovalov saved three break points before winning an epic 14-minute third game, which included 10 deuces.
The pair continued to trade games up until a tie-break, where Nadal saw a 3-0 lead evaporate by the first change of ends.
He edged ahead again but Shapovalov won the next three points to bring up match point, which he took at the first attempt with a forehand winner.
Nadal will overtake Murray in the rankings after next week’s Cincinnati Masters, but faces a challenge from Roger Federer, who could prevent the Spaniard reaching top spot for the first time since 2014.
Federer saw his streak of winning 32 consecutive sets end against David Ferrer but bounced back to reach the last eight.
Wimbledon champion Federer, who celebrated his 36th birthday on Tuesday, prevailed 4-6 6-4 6-2 in just under two hours in Montreal.
Ferrer took the first set 6-4 against world number three, who had not dropped a set since his shock defeat to Tommy Haas at the Mercedes Cup in June.
But Federer, a three-time winner of the tournament, recovered to seal a last-eight clash against Roberto Bautista Agut.
Bautista Agut fought back from a set down and out-lasted Frenchman Gael Monfils 4-6 7-6 (7/5) 7-6 (7/2) in just under three hours.
Fourth seed Alexander Zverev extended his winning streak on hard courts to seven matches as he beat Nick Kyrgios 6-4 6-3.
Argentina’s Diego Schwartzman recovered after failing to take a game in the opening set to beat USA’s Jared Donaldson 0-6 7-5 7-5.
World number 36 Schwartzman will play Holland’s Robin Haase who overcame Grigor Dimitrov 7-6 (7/3) 4-6 6-1.
Kevin Anderson eased past Sam Querrey 6-4 6-1 while Adrian Mannarino beat Hyeon Chung 6-3 6-3 and will be Shapovalov’s quarter-final opponent.