LONDON (AP) -- Roger Federer made the most of Kei Nishikori's erratic play Tuesday to secure a 6-3, 6-2 victory and move closer to a semifinal spot at the ATP Finals while Andy Murray posted his first victory to stay in contention at the elite tournament.

Federer, the most successful player at the year-end championship with six wins, would have progressed if Milos Raonic had defeated the home favorite, but the former Wimbledon champion completed a 6-3, 7-5 win over the Canadian newcomer in a dour match that produced very little excitement.

Murray, who had lost his two previous encounters with the big-serving Raonic, ensured some suspense for the last day of matches in his group, with all four players retaining a chance to progress.

''It's a nice match on Thursday to look forward to, it'll be a great atmosphere again,'' said Murray about his final round-robin match against Federer. ''It's always a pleasure to play against Roger. He's one of the greatest players that has ever played so to get the opportunity to play him in an atmosphere like this is excellent.''

After losing his first match to Nishikori in straight sets, the Scot said he found inspiration in his coach's experience to bounce back.

''Amelie was saying one of the times she made the final of the year-end championships, she lost her first match 6-2, 6-2 against (Nadia) Petrova. Obviously it wasn't feeling great.'' said Murray, who hired Amelie Mauresmo after splitting with Ivan Lendl. ''Then she went on to reach the final. It's nice to have these sorts of discussions, having someone that's experienced having been in a tough situation after the first match.''

In the afternoon session, Nishikori made it easy on Federer as he struggled with consistency throughout. The 24-year-old U.S. Open finalist showed his vast array of shots with some superb backhand winners but made a total of 30 unforced errors and, once again, could not find his serve.

''He's shown in the past when he gets the upper hand against any player from the baseline, he's very difficult to beat,'' said Federer after moving to 2-0 in his group. ''Today for some reason he couldn't get it done. Maybe I was playing too well (...). But I know that Kei can play better. So for me it was really important to take advantage of the fact that I was feeling really good, and then maybe he was struggling a little bit today.''

Nishikori, one of three debutants at the O2 Arena this year, had been able to make up for his poor service percentage in his opening win over Murray with his powerful groundstrokes. Against Federer, it was a different story.

The Swiss served well and played aggressively on Nishikori's second balls to cut short rallies. After a tight third game where the Japanese could not convert two break points, the Swiss produced a superb crosscourt forehand passing shot to earn a first opportunity to open up a 3-1 lead, and seized it with another forehand winner.

Federer, who retains an outside chance of overtaking Novak Djokovic for the year-end top ranking following a season in which he claimed five titles, then held comfortably to wrap up the set.

Nishikori called for a medical timeout at the start of the second set for treatment on his right wrist, but things did not improve afterward. He dropped his serve after hitting three unforced errors to hand a 2-1 lead to Federer and fought hard to save two break points in the seventh game, but hit his fifth double-fault of the match on the third one.

''I didn't play really bad. But still, I wasn't really consistent on everything: my serve, my strokes,'' Nishikori said. ''I made unforced errors. So that's why I couldn't stay there.''

Against Murray, Raonic struggled with his favorite weapon early on, only averaging 37 percent of first services in the first set.

The Scot broke in the sixth game after the Wimbledon semifinalist shanked an easy smash before hitting two more unforced errors. But Murray could not build on the momentum after opening a 2-1 lead in the second set when Raonic dropped his serve after double-faulting to gift him a break point.

Raonic broke back immediately and both players held until 5-5 when Raonic let his nerves get the best of him, sending a forehand wide and netting a half-volley to give Murray the upper hand. The fifth-seeded Murray made no mistake on his next service game, closing out the match on his second occasion when Raonic went long.

''The serve sort of affects everything else,'' said Raonic, who can still make it to the knockout phase if he beats Nishikori in straight sets and Federer downs Murray the same way. ''Serving, holding more comfortably. I lost my serve six times in three sets out of four sets I've played. It creates a higher pressure on my opponents when I serve well and also takes some off my back and allows me to swing more freely on return games.''