Rafael Nadal tonight shook off dogged resistance from Nicolás Almagro to stay on course for a fifth French Open title.

Although he maintained his record of not having dropped a set at this year's tournament, the world No2 was made to fight all the way by his fellow Spaniard before sealing a 7-6 (7-2), 7-6 (7-3), 6-4 victory in two hours and 35 minutes.

Almagro atoned for his humiliation by Nadal at the same stage at Roland Garros two years ago with a courageous display, but he was unable to compete in the tie-breaks against an opponent who is now the overwhelming favourite for the title following the defending champion Roger Federer's exit last night.

Nadal, who turns 24 tomorrow, had won all six of his previous meetings with Almagro, including a 6-1, 6-1, 6-1, thrashing at the same stage of the 2008 French Open – the most one-sided men's quarter-final in the tournament's history.

But Almagro, who was bidding to reach his first grand slam semi-final, had taken a set from his compatriot in their past two meetings – and he made a lightning start, winning eight of the first nine points to move 2-0 ahead.

He was forced to save two break-back points in the next, winning it to secure as many games as he had in the whole of their last Roland Garros clash. But typical chasing down from Nadal helped him break back in game five and, although Almagro continued to trouble him with his aggressive play, a tie-break followed which the former completely dominated.

Undeterred, Almagro continued to go toe to toe with his illustrious opponent in a punishing second set, which saw no break points until Nadal serve-volleyed his way out of trouble in game nine. It proved the only break chance of the set and Nadal made Almagro pay for not taking it by stepping up the pace in the tie-break once more to take a two-set lead.

The second seed had break point in the opening game of the third but Almagro refused to yield. Once again, neither player looked like dropping their serve until the latter made a succession of mistakes in game nine and was broken to love. Almagro saved one match point with a brilliant winner in the next but Nadal was not to be denied, setting up a semi-final against Jürgen Melzer.