LONDON: Stanislas Wawrinka rallied to beat David Ferrer 6-7 (3), 6-4, 6-1 in his final round-robin match at the ATP World Tour Finals to keep alive his hopes of reaching the semifinals.

Wawrinka hit 35 winners, including 12 aces, to clinch his second win at the elite year-end tournament. But he still needed top-ranked Rafael Nadal to beat Tomas Berdych in the evening match to progress to the last four.

"For sure, I'm going to be a big fan of Rafa," said Wawrinka, who is enjoying a breakthrough season after years in the shadow of his fellow Swiss Roger Federer. "I did my job all week. I did the best I can so now I'm just going to watch what is going to happen and I'll be really happy if Rafa wins tonight."

Nadal, who clinched the season-ending No. 1 ranking this week, has already qualified from Group A after winning his first two matches without losing a set.

Defending champion Novak Djokovic has won Group B and the winner of Saturday's match between Juan Martin del Potro and Federer will join him in the semifinals.

Serving hard and varying his play nicely, Wawrinka had the upper hand early on and broke for a 4-2 lead before comfortably holding serve in the next game. But the seventh-seeded debutant failed to build on the momentum and made three unforced errors when serving for the set, and Ferrer then used an aggressive net game to win four consecutive games, including one that lasted 14 minutes

The Spaniard's excellent spell abruptly ended in the next game when Wawrinka took his serve at love to force a tiebreaker.

Ferrer, the 2009 runner-up, jumped to a 4-0 lead before his opponent's 29th error of the match gave him three set points. Following another long exchange from the baseline, Wawrincka missed a forehand to lose the set.

Wawrinka looked frustrated but it was soon Ferrer's turn to wobble, with the third-seeded Spaniard making three unforced errors including his first double-fault of the match in the third game of the second set as he dropped serve and whacked his racket against the floor in anger. This time, Wawrinka held his serve to level the match.

Two unforced errors by Ferrer in the first game of the decider gave Wawrinka an early break, and the U.S. Open semifinalist hit three aces in the next game for a 2-0 lead. Wawrinka broke again for a 4-1 lead and closed out the match with a backhand after Ferrer misplayed an easy volley.

Djokovic ready for one last push at Tour Finals

Meantime, Novak Djokovic insists he is willing to defy his flagging energy levels in a bid to finish the campaign with more glory at the ATP World Tour Finals.

The defending champion booked his spot in the semi-finals at London's O2 Arena by defeating Argentine fourth seed Juan Martin del Potro 6-3, 3-6, 6-3 on Thursday.

It was Djokovic's 19th straight victory dating back to his US Open final defeat by Rafael Nadal.

The Serbian only arrived in England on Sunday night after winning his third straight title at the Paris Masters and fatigue has inevitably been his biggest opponent to date at the season-ending showpiece.

But Djokovic is showing once again that his appetite for victories and titles has no limit.

"I had a great start of the season and now a great ending of the season," he said.

"I just feel good at this particular part of the year. I know most of the players are exhausted physically, mentally, emotionally, after a long season.

"But I try to find that as an opportunity for me to get extra motivated to push myself to the limit and deliver the goods when needed."

Djokovic discovered on Wednesday that his bid to finish the season as world number one had failed after Nadal wrapped up top spot in the year-ending rankings.

But the world No. 2 showed no signs of letting that disappointment affect him as he continued his bid to retain Tour Finals title

"It's not frustrating for me. Actually I'm very encouraged by the way I've played over the last two months," Djokovic said.

"I'm playing the best tennis I think I played throughout the whole season. That's something that I take as a positive for this moment and for next season.

"I'm definitely feeling confident, more confident than I was a few months ago.

"Nadal has ended as No. 1 in 2013 and he deserves that. No question about it.

"He won two Grand Slams. He played the best tennis this year."