Eight-times champion Rafael Nadal was taken to the brink by Bulgarian Grigor Dimitrov before completing a 6-2 2-6 6-4 victory on Friday to reach the Monte Carlo Masters semi-finals.
Nadal, who made an unusual number of errors and looked uncomfortable throughout against his 21-year-old opponent, slowly ground him down and fired an ace to clinch his 45th successive victory at the first big claycourt event of the season.
The Spaniard now has a 47-1 win-loss record at the glamorous venue and will next face Frenchman Jo-Wilfried Tsonga who beat Swiss Stanislas Wawrinka 2-6 6-3 6-4 to reach the last four for the first time.
The straight-laced crowd, for once reluctant to support Nadal with Dimitrov threatening to pull off a shock win, stood up to cheer the 34th-ranked Bulgarian as he left the court after a thrilling performance.
Nadal had his share of applause after setting up a semi-final against Frenchman Jo-Wilfried Tsonga who opened the a chilly grey day by the Mediterranean with a powerful 2-6 6-3 6-4 win over Swiss Stanislas Wawrinka.
World number one Novak Djokovic, still recovering from a sprained ankle, was scheduled to meet Finland's Jarkko Nieminen and seventh seed Richard Gasquet of France faces Italian Fabio Fognini in the other quarter-finals.