( CNN ) -- Rafael Nadal and Roger Federer are both through to the last four of the Madrid Masters , although they enjoyed vastly differing victories on Friday . Second seed Nadal defeated Gael Monflis in straight sets , to book his place against compatriot Nicolas Almagro . Nadal outclassed Frenchman Monfils 6-1 6-3 in just 79 minutes and remains on course to regain his world number two ranking next week after a stunning start to his clay-court season . The Spaniard is aiming for his third consecutive clay-court title this year and record 18th ATP Masters success of his career . Earlier in the day , Almagro needed under an hour to dispose of Austria 's Jurgen Melzer 6-3 6-1 , to reach his first-ever masters tournament semifinal . Meanwhile , Federer clinched a revenge win over Latvian Ernests Gulbis , who beat the Swiss maestro in Rome three weeks ago . Defending champion and top seed Federer fought back to win 3-6 6-1 6-4 and will face either Andy Murray or David Ferrer for a place in Sunday 's final . `` I knew it would be a tough match after losing to him in Rome , '' Federer told reporters . `` I was always a bit worried . I got off to a slow start in the first set and paid the price . In the second I recovered and won six games in a row and got on a roll . ''
Top two seeds Roger Federer and Rafael Nadal reach Madrid Masters final . Federer def . Gulbis in three sets while Nadal sees off Ricardo López . Federer 's victory over Gulbis avenged his defeat at the hands of the Latvian in Madrid .