Andy Murray avoided following Novak Djokovic out of the Monte Carlo Masters exit door after surviving a scare against local favourite Benoit Paire to reach the quarter-finals with a 2-6 7-5 7-5 victory.
A day after world number one Djokovic suffered a stunning defeat by 55th-ranked Czech Jiri Vesely, Murray looked in trouble against Paire before subduing his opponent to set up a meeting with Canadian Milos Raonic.
World number two Murray was 5-4 down in the third set when Paire cracked under pressure and lost the remaining three games to hand victory to the Briton.
"I panicked. It's the biggest disappointment of my career," said Paire, who won the first set easily and was two breaks up in the second before Murray fought back.
Eight-times Monte Carlo champion Rafa Nadal was made to work hard by Dominic Thiem before advancing to the last eight 7-5 6-3 after the Austrian wasted 15 of 16 break points in the opening set.
The Spaniard will next face Stan Wawrinka after the Swiss, who won the claycourt Masters in 2014, demolished Frenchman Gilles Simon 6-1 6-2.
"From the start I was very strict with myself. I had to keep my tactics, be patient, attack him whenever I had the opportunity," said fourth seed Wawrinka.
"My concentration was very good. This is important against Gilles. From the start I needed to dominate and be very present on the court. I succeeded in doing that."
Third seed Roger Federer, back in action after a 10-week layoff, eased past Spain's Roberto Bautista Agut 6-2 6-4.
The Swiss star will face Jo-Wilfried Tsonga after he beat fellow Frenchman Lucas Pouille 6-4 6-4.
France's Gael Monfils, the 13th seed, ended the run of Djokovic's conqueror Vesely with a 6-1 6-2 win.