Defending champion Roger Federer won a 20th straight match on Thursday by beating Andreas Seppi 6-3 5-7 6-4 in the quarter-finals of the Qatar Open to set up a final four meeting with Jo-Wilfried Tsonga.

Federer, who had dropped just nine games in his opening two matches in Doha, struggled at times against the towering Italian and he will have to improve to beat Tsonga.

I'm looking forward to playing him, said Federer in a court-side interview. I hope we can live up to expectations.

The Swiss started brightly, winning Seppi's first service game, but soon lost his own serve with a double fault as the eighth seed came back to 2-3. The 16-times grand slam winner broke again and saw out the first set.

Seppi, who had never previously won a set in seven matches against Federer, was unbowed, going 0-40 up on his opponent's opening service game of the second set.

Federer hammered down consecutive aces to save the first two, but a tentative second serve from the world number three then enabled 27-year-old Seppi to seize his chance and go 2-0 ahead.

The Italian had another break chance for a 4-0 lead, but Federer escaped with a big serve that left Seppi helpless to trim the deficit to 1-3.

Seppi held and then broke Federer for a third time with a backhand winner to go 5-1 ahead.

Federer, 30, remains a fierce competitor and won the next four games to level, but then seemed to relax unduly and Seppi won eight of the next nine points to clinch the set.

Seppi, ranked 38 in the world, served first in the decider as he and Federer held to make it 1-1, but the Swiss ratcheted up the pressure and the Italian cracked, attempting a passing shot as Federer neared the net that went long to concede a decisive break.

There were flashes of Federer's genius, especially a half-volley drop-shot scooped from his feet in mid-court, but he continued to give the Italian chances.

At 3-4 down, Seppi had two opportunities to square the match on Federer's serve, but the Italian missed the first, hitting an attempted backhand winner into the net from the baseline, while the second was lost to a searing Federer serve.

It was tough, I started well and was able to take control . in the second set he started to hit the ball better and in the third (set) it was close, Federer added.