Rafael Nadal will play Marin Cilic in the semi-finals of the Shanghai Masters on Saturday after the world number one was forced to fight past Grigor Dimitrov 6-4, 6-7 (4/7), 6-3.
The Spaniard, who has never won the Shanghai showpiece, is chasing a seventh title in a brilliant season and a hat-trick of triumphs on the trot, having been crowned US Open and China Open champion in recent weeks.
The 16-time Grand Slam winner saw off the Bulgarian Dimitrov in Beijing last week but suffered some hairy moments in getting the better of him again in a nervy quarter-final played in overcast conditions.
Top seed Nadal, 31, grabbed the crucial break of serve in the ninth game of the first set and there was nothing between them as they entered a tense second-set tie break.
Nadal got the mini-break for a 3-0 lead in the tie break, but sixth seed Dimitrov scrapped back to level, and then stunned the Spaniard to clinch the tie break.
The two friends headed into a deciding set with Dimitrov in the ascendancy and the pro-Nadal crowd fearing an upset.
Dimitrov sensed another opportunity in the fifth game of the third set, but Nadal survived the break point.
Nadal took the momentum into the next game to immediately break Dimitrov and finally end the Bulgarian's resolve.
The Spaniard's victory march was only momentarily held up when a disturbance broke out in the crowd and the players were forced to wait as a small group of spectators was escorted out of the arena.
A relieved Nadal looked up to the heavens and raised his arms at the end.
The Croatian fourth seed Cilic beat the unseeded Spaniard Albert Ramos-Vinolas 6-3, 6-4 for a date with Nadal.
Cilic, bidding to reach the season-ending ATP Finals in London, grabbed the critical break in the sixth game of the first set on his way to a comprehensive victory.
Cilic said consistency was key.
"My team has worked really well in all parts of my game just to bring it up to the nice level that I can keep it up throughout every single week," he said.
"I got to understand also all the things that we were working on.
"They are quite clear for me and I also am a little bit more consistent this year in serving performances.
"I'm winning quite a lot of service games and a lot of matches."
The remaining two quarter-finals pit number two Roger Federer against unseeded Frenchman Richard Gasquet, the winner will play Argentina's Juan Martin del Potro or Viktor Troicki of Serbia in the last four.