Novak Djokovic
Djokovic is through to the semi-final.

Defending champion Novak Djokovic secured safe passage to the ATP World Tour finals last four after a 6-3 3-6 6-3 win over Juan Martin del Potro at London's O2 Arena.

Del Potro must now beat Roger Federer in a straight shoot-out for the second qualification place in Group B after the former world No.1 overcame Richard Gasquet in straight sets in the afternoon session.

­Djokovic though is safely through but staged his second victory at the season ending finals not without alarm, surviving two break points in the opening game where he produced an excellent backhand winner to save serve, before he broke himself for a 4-2 lead.

The Serbian subsequently served out the set but Del Potro hit back early in the second, benefitting from a net cord amid an engrossing backhand rally, to break.

Del Potro, who had lost six of his last seven meetings with Djokovic, was rewarded for his increased aggression by levelling the match.

Two break points at the start of the deciding set came and went for Del Potro and the former US open champion was made to pay as Djokovic converted the first of three break points and comfortably saw out the remainder to book his place in the semi-final as he plots an unbeaten end to 2013.

Meanwhile, Federer's pursuit of a seventh ATP World Tour Finals crown was given a lifeline after he Richard Gasquet in two sets in the afternoon session.

The 17-time grand slam champion broke the French No.8 seed twice before taking the opening set 6-4.

Gasquet, who lost in three sets to Juan Martin del Potro on day one, was broken immediately at the start of the second set as Federer produced shades of his spell as world No.1 and after securing another break cruised to a two set win.

"I don't think I'm automatic," said Federer, who must beat Del Potro on Saturday to avoid a round robin exit. "I'm happy to be part of that funny game again.

"I think the win in Paris was big for me, because he [Del Potro] did beat me three times indoors straight. I'm glad I got one back in Paris because I knew we could be again in the same group, we could be playing each other.

"I think that win in Paris psychologically was very important. I could beat to 10 guys, I beat Richard, I beat Juan Martin last week. I truly believe my confidence is higher."

Gasquet, now out of his first season ending tour finals since 2007, added: "Of course it's disappointing for me to lose two matches in a row, but I try my best. It's as I said, very nice to play on this court.

"I'm taking a lot of experience playing this Masters because the level is very high, very difficult. So it's very good for me to play these matches for next year."