LONDON (AP)—Juan Martin del Potro is getting the better of Roger Federer again, in a way that no player had managed in a decade.
To end the season with a title, though, he might have to get past the Swiss great again in just two days.
Using his hard serve and booming forehand, Del Potro earned the last spot in the semifinals of the ATP finals Saturday by overcoming the already-qualified Federer 7-6 (3), 4-6, 6-3 in their last round-robin match. Del Potro will face Novak Djokovic in the semifinals Sunday, before Federer takes on Andy Murray.
It was Federer's second straight loss to Del Potro, who also beat him in the final in the Swiss star's hometown tournament in Basel last month. It's the first time a player has beaten Federer in two straight indoor tournaments since Lleyton Hewitt in 2002.
''It's a little record, but really tough to do it,'' Del Potro said. ''To beat Federer is not easy, for sure. But I didn't think about the semis or trying to qualify for the next round. Just was thinking about my match, doing the same things like in Basel.''
Del Potro beat Federer in the 2009 U.S. Open final for his only Grand Slam title, leading many to predict that the tall Argentine would challenge for many more major titles. But he then had much of the next season ruined by a serious wrist injury and has struggled to re-establish himself at the top.
This year, he wasted a two-set lead against Federer in the French Open quarterfinals and lost to him in the longest Olympic match ever, an epic semifinal that ended 19-17 in the third set.
''Good effort (from) his side to get me twice in a row now,'' Federer said. ''I hoped I didn't have to lose against him again today.''
It was Federer's first loss in the indoor tournament since 2009, ending a 12-match winning streak. He went undefeated in winning the last two titles and had won his first two group-stage matches this year.
Del Potro's win left David Ferrer and Janko Tipsarevic with only prize money and pride to play for in their group finale as both players had been eliminated. Ferrer seemed the most sluggish at the start and lost the first four games, but the Spaniard recovered to win 4-6, 6-3, 6-1, leaving Tipsarevic without a victory in the tournament.
That match still had an impact on the tournament, as it meant Federer won the group ahead of Del Potro and was matched with Murray in the semifinals. Had Tipsarevic won, the order would have been reversed.
Del Potro said he still considers himself the underdog in the tournament.
''Now you have three big names in the semifinals, and one big guy,'' the 6-foot-6 (1.98-meter) Del Potro said.
Del Potro converted his only break point of the match in the opening game of the deciding set and held his own serve comfortably to wrap up the win at London's O2 Arena.
He converted his first match point with a forehand passing shot that Federer netted off a lunging backhand volley.
Both players finished the group stage with 2-1 records. Ferrer was also 2-1, but won fewer sets than Federer and Del Potro. If Federer had won against Del Potro, Ferrer would have advanced with a victory against Tipsarevic.
''I really wanted to give (Ferrer) a chance and give myself the best possible preparation for the semis, really hoped I could win,'' Federer said. ''But more disappointed for (Ferrer) than I am about losing today, to be quite honest.''
Ferrer won a tour-best seven tournaments this year, including his first Masters title in Paris last week. He still has a chance for another major victory, as Spain will take on the Czech Republic in the Davis Cup final next weekend.