LONDON: Roger Federer stayed in the hunt for a semi-final spot at the ATP World Tour Finals on Thursday when he beat Richard Gasquet 6-4, 6-3 in round-robin play.

The 81-minute win meant that Federer avoided the embarrassment of losing two straight group matches in a row for the first time at the year-end event after the six-time champion was beaten by Novak Djokovic in his opening match.

Federer still needed six match points to get the job done in an afternoon of 29 winners and 30 unforced errors as he broke Gasquet in a marathon final game.

The 17-time Grand Slam winner wasted his first five match points with unforced errors before Gasquet put a return wide.

Federer, playing the season finale for the 12th consecutive year, earned his 11th win over the Frenchman from 13 matches.

He has now won a record 43 matches at season wrap-up tournaments; Gasquet dropped to 1-4 at the finals on his second appearance.

In the evening match, world No.2 Djokovic was facing Argentine Juan Martin del Potro, as two of the most in-form players on the ATP square off.

A win for the Serb would send him into Saturday’s final four at the O2 arena along with Rafael Nadal.

“I’m very happy with today’s match,” said Federer. “Richard has an incredible style and beautiful shot-making.

“It was tough out there, and losing my first match put more pressure on me. This was a big match. I hope to keep it up against Juan Martin, there will be a lot to be played for.” Federer was momentarily rocked at the start as Gasquet won the first six points before the Swiss gathered his resources in the must-win contest.

The 32-year-old came from 0-30 in the second game to hold and then seized a break for 2-1.

Federer lost his lead in the eighth game as he saved one break point but sent a backhand wide to bring Gasquet level at 4-4.

The Swiss broke straight back for 5-4 and set up three set points a game later with his third ace.

The longtime London crowd favorite converted on his first to take the early lead after 34 minutes.

Federer began the second set with a break and stayed in charge throughout despite struggling with his consistency before closing out victory.

The win was his 44th of the season.