LONDON — On an indoor court, Roger Federer can win even when he's not playing his best. He proved that again Thursday at the ATP Finals, beating David Ferrer 6-4, 7-6 (5) and advancing to the semifinals with a match to spare despite struggling to land his serve and scrambling to stay in the long rallies. Federer, a six-time champion at the season-ending event for the top eight players in the world, made only 53 percent of his first serves at the O2 Arena. And in his first two service games alone, he was forced to save six break points. But he did save them, and three others, while getting broken only once. With the victory, Federer improved his record over Ferrer to 14-0. In 10 years of facing each other, Ferrer has won only three sets against the 17-time Grand Slam champion. That looked like it was going to change Thursday. Ferrer was on the run for the entire match, getting to ball after ball to extend rallies and keep Federer on the move. In the opening game, the Spaniard quickly took a 0-40 lead but failed to convert any of his three break chances. He had three more chances in the third game — minutes after Federer had broken Ferrer's serve — but again Federer was able to pull through and hold. Ferrer did finally manage a break to get back on serve at 3-2, but Federer didn't allow another. Federer is 2-0 at this year's ATP finals, putting him into the semifinals. He will still have to face Juan Martin del Potro Saturday, however. Del Potro was playing Janko Tipsarevic in the other Group B match later Thursday. Ferrer and Tipsarevic will then meet Saturday. On Wednesday, Tomas Berdych remained in the hunt for a place in the semifinals after the Czech fifth seed defeated France's Jo-Wilfried Tsonga 7-5, 3-6, 6-1. Berdych, who lost his opening Group A fixture against Andy Murray, now has to beat world No. 1 Novak Djokovic Friday to book his place in the last four of the prestigious season-ending event. The former Wimbledon finalist's victory also means Djokovic isn't certain to qualify yet even though the Serb maintained his 100 percent record with a win over Murray earlier Wednesday. Tsonga isn't definitely eliminated, but he would need to beat Murray in straight sets and hope Berdych loses by the same margin against Djokovic to advance. Berdych had beaten Tsonga in both of their meetings this year, including the final of the Stockholm Open, and the 27-year-old was a deserved winner again after a blistering finish. Tsonga hasn't defeated a top-eight ranked player this year and once again the flamboyant Frenchman was too inconsistent on the big points. Berdych had a chance to take control of the first set when he earned three break points in the seventh game, but Tsonga saved all three with a series of booming serves and powerful forehands. Tsonga didn't make the most of his escape though as a series of wayward groundstrokes gifted Berdych the first break at 6-5 and the Czech gleefully seized the chance to serve out the set with an ace. Berdych saved two break points at 1-2 in the second set, yet Tsonga was beginning to find some momentum and he pressured the Czech into one more mistake to move 3-1 ahead. Tsonga briefly wobbled when he served for the set, giving Berdych a break point, but he held on to send the match to a decider. Berdych was under pressure again in the first game of the final set, this time digging deep to save two break points, and he made the most of his reprieve with a break for a 3-1 lead. Suddenly the tide had turned back in Berdych's favor and he sealed the win in emphatic fashion with a second break. — Agencies