Roger Federer will reclaim the number one ranking for the first time in more than five years after overcoming Robin Haase to reach the Rotterdam Open semi-final.

Not since November 2012 had Federer topped the rankings but the evergreen 36-year-old became the oldest man to reach the summit thanks to Friday's 4-6 6-1 6-1 victory.

Federer, who accepted a wildcard to the tournament earlier this month, will replace Rafael Nadal when the rankings are updated on Monday.

Afterwards, the 20-time grand slam champion told reporters: "It's a little bit surreal. The first time I got back to number one was in 2004, a long, long time ago. It was more than five years since I was last number one. It was particularly nice today as I had to go and get it, win a match. Back in 2012, I won Wimbledon and a week later, when I was on holiday, I found out that I was number one."

Federer, who won his sixth Australian Open last month, did not have it all his own way against Haase after dropping the opening set.

But the Swiss maestro recovered, racing out to a 3-1 lead in the second set before winning nine of the next 10 games to seal his place in the final four.

"I thought I was pretty calm," Federer added. "I woke up, I had a good sleep and then watched the Winter Olympics for three-four hours, before I headed on-site. I had a normal warm-up and had a good routine. I knew what I wanted to do and how I wanted to play. I was backing myself and I was confident. A lot of people have asked me today how I handle all of the pressure. But I think it helps all of the big matches I've played over the years.

"Losing the first set, definitely got my head spinning a little bit. It reminded me that I had to go and get the victory (Friday). It wasn't going to be handed to me. I had to change my plan and started to play more aggressively.

"I will enjoy the moment. I've already had a glass of [Moet & Chandon] champagne and I'll have another one later on. I'll play late again tomorrow [Saturday], so I can have a good sleep and enjoy myself. It's incredibly special and I'm so happy. Severin [Luthi] also flew in tonight, so it was an extra surprise too."

Next up for Federer is lucky loser Andreas Seppi, who defeated Daniil Medvedev 7-6 (7-4) 4-6 6-3.

On the other side of the draw, Tomas Berdych's withdrawal prior to his quarter-final handed fourth seed David Goffin a walkover.

The Belgian meets second seed Grigor Dimitrov in a rematch of last year's ATP Finals showpiece after the Bulgarian defeated Andrey Rublev 6-3 6-4.