Roger Federer came alive once again after losing the first set, rallying to beat Andy Murray 3-6, 6-3, 6-1 at the ATP World Tour Finals and ensuring he will have the year-end No. 1 ranking for the fifth time.

Federer dominated Murray in the final two sets, finally controlling play from his serve and also getting his forehand on target. Murray, meanwhile, started to struggle to win any points.

But for Federer, finishing the year as the top-ranked player was better than beating Murray.

“Obviously, that was one of my big goals for this season. And it’s one of the greatest performances I think I’ve achieved,” said Federer. “Playing so well at the most important moments, it’s been the key this year. And staying healthy.”

Federer, who has two wins from two matches in Group A and is favoured to reach the semifinals at the season-ending tournament, still has to play Juan Martin del Potro in the round-robin stage. Del Potro beat Federer in the U.S. Open final.

“It could be a make-or-break match for us to get through,” said Federer, who also lost the first set in his opening match. “If that’s the case, I’ll give it all I have and try to beat him this time.”

Earlier, Del Potro held on to beat Fernando Verdasco 6-4, 3-6, 7-6 (1), giving him a good chance to reach the semifinals at the O2 Arena.

Because of Federer’s win, he cannot be overtaken by second-ranked Rafael Nadal, who lost to Robin Soderling in his first Group B match.

Federer began the night by breaking Murray’s serve, but it was more because of the Briton’s errors than Federer’s stellar play. The lead didn’t last, however, because Murray broke right back, and then started to play the kind of tennis that earned him six wins over Federer in their previous nine meetings.

Murray then broke again for a 4-2 lead, and saved a pair of break points in the next game before eventually winning the first set. In the second, Federer won his first three service games at love, and he then broke Murray to take a 4-2 lead.

“If you give someone (the) opportunity to dictate, not only on his own service games, but on yours, it’s very difficult to win,” said Murray, who had eight double-faults in the match. “I served so poorly that anyone would have looked good against me tonight.”

Along with his improving serve, Federer’s forehand was also starting to get back to normal. In the second set alone, Federer managed 10 of his 16 forehand winners - after only two in the first set.

Despite the loss, Murray can still advance to the semifinals.

“I just win against Verdasco. I think that’s pretty much what I have to do,” Murray said. “If I win in straight sets, then I think, well, a great chance that I go through.”

In the early match, Del Potro wasted two match points in the third set and then was broken while serving for the win.

“I served much better than the other match,” said Del Potro, who lost to Murray in his opening Group A match. “I was very focused in the important moments, especially in the tiebreak, and I take my opportunities.”

The fifth-ranked Argentine most likely will have to beat four-time champion Federer on Thursday to reach the semifinals. Verdasco, with two losses, will face Murray in his next match.

Del Potro and Verdasco traded powerful forehands and accurate backhands. But the U.S. Open champion had the advantage through much of the third set and earned his second break of the match in the sixth game - with the help of instant replay.

Verdasco sent a shot toward the baseline, and Del Potro played it cleanly and sent it back over the net. But he also immediately raised his arm to challenge the call, believing it was long. He was right, and the reversal gave him a 4-2 lead.

“It’s not enough to play good tennis to beat these guys,” Verdasco said. “You need to play good tennis and also play very good in the very important moments.”

More In: Tennis | Sport