(CNN) -- The top two seeds, Roger Federer and Rafael Nadal, are through to the final of the Madrid Masters -- although both players were taken to three sets in tough semifinal encounters.
Second seed Nadal, who will now overtake Novak Djokovic and return to number two in the world ranking, dropped his first set of the tournament against fellow- Spaniard Nicolas Almagro.
However, the Majorcan fought back to secure a 4-6 6-2 6-2 victory, to continue his unbeaten record on clay-courts this season, securing his 14th successive win in the process.
Nadal has already claimed Masters victories in Monte Carlo and Rome and victory over old rival Federer -- who beat him in last year's Madrid final -- will give him a record 18 Masters titles, one more than Federer and Andre Agassi.
"Getting into another final is a huge joy. It's been a long spring season on clay and being in this final is a real dream for me," Nadal told reporters.
"Whatever happens now, this has been very good. Not in my wildest dreams could I have thought of winning two Masters titles and getting to the final of a third."
Meanwhile, Federer was also taken to three sets by Andy Murray's conqueror David Ferrer, before eventually fighting back to win 7-5 3-6 6-3.
Ninth seed Ferrer had lost all nine of his previous meetings with Federer but is the most in-form player on the ATP Tour this season, having won 33 matches.
Federer is looking to earn his second title of the year, after the Australian Open, and is finding his clay-court form just in time for the defence of his French Open title.
"It's very strange that we have not played in a year," said Federer. "I'm really looking forward to playing Rafa again. It's exciting for tennis that we can face off again."