Rafael Nadal staggered over the line after a dominant first-set display against Joao Sousa, eventually winning 6-0 4-6 6-3 to set up a Madrid Open semi-final against Andy Murray.
The fifth seed came into the match having not dropped a set at his home tournament, but stepped things up a gear by racing to victory in the first in just over 25 minutes.
Nadal allowed a big chance to slip away as he lost the second following a rain delay, but recovered to make a crucial break in the decider and secure his progression.
Sousa was not at the races on his own serve in the opening set, winning just 38 per cent of points on his first and none from five on his second.
That meek showing facilitated Nadal's relentless rampage to a first-set bagel, although the Portuguese did force a break point at 2-0 down and made his opponent wait until his third set point to seal the inevitable.
Sousa's first game win was greeted with warm, if slightly patronising, applause by the Spanish crowd, who delighted in seeing their home hero producing the kind of dominant performance that has become an increasingly rare sight during his struggles with form over recent seasons.
A second game went Sousa's way as the world number 35 tried his best to make a contest of the match, but Nadal won to love in the next to re-assert his superiority as the heavens opened.
The rain eventually forced a brief interlude as the roof was closed, with Nadal objecting to use of the covers, seemingly keen to put the match to bed as quickly as possible.
The covers stayed off but Nadal, who had been on the verge of a break prior to the rain delay, failed to make his advantageous position count upon his return to court and eventually fell a break down to leave Sousa serving for the set.
Sousa took full advantage and matched his opponent for much of the decider, but a break to go 5-3 down proved fatal to his chances, as Nadal held on despite his post-downpour slump.