Towering Argentine Juan Martin del Potro snapped Roger Federer's three-year unbeaten sequence at the ATP World Tour Finals on Saturday to earn a semi-final against world number one Novak Djokovic at the season-ending showpiece.
Del Potro, fresh from beating the Swiss in the Basel final a fortnight ago, claimed a 7-6, 4-6, 6-3 victory at the O2 Arena to guarantee himself runner-up spot in Group B with a 2-1 record, the same as defending champion Federer who will meet Andy Murray for third time in London this year in the other semi-final.
Federer won his seventh Wimbledon title this year when he beat Murray in the final but a few weeks later the Briton gained revenge in the Olympic gold medal match.
The Swiss 31-year-old, winner of 12 consecutive matches at the tournament since a semi-final defeat by Nikolay Davydenko in 2009, had already qualified for the semis before walking on court to face del Potro and produced a patchy display.
David Ferrer beat Janko Tipsarevic 4-6, 6-3, 6-1 in the last round-robin match in the evening to also end with two wins and one defeat but the Spaniard missed out on sets countback.
The final day of group play began with seven scenarios still possible in Group B.
Del Potro's three-set win ended Ferrer's semi-final hopes but muddied the waters as far Sunday's schedule was concerned because the outcome of the Ferrer v Tipsarevic clash would bizarrely decide whether Federer or del Potro won the group.
Victory for Tipsarevic would have seen Del Potro top the group because of a better head-to-head record against Federer but Ferrer's victory and a three-way tie meant Federer 5-2 sets tally earned him the group winners' spot.
Del Potro ended 5-3 with Ferrer 4-4.
Spain's Ferrer had been relying on a Federer victory to keep his hopes of a semi-final place alive.
"I was actually thinking more about David than I was thinking about whether I play Andy (Murray) or Novak (Djokovic), to be honest," Federer, who will contest a 10th semi-final in 11 appearances at the tournament, told reporters.
"I really wanted to give him a chance and give myself the best possible preparation for the semis.
"I really hoped I could win. I'm more disappointed for him than about losing today, to be quite honest."
Del Potro's defeat of Federer was reminiscent of 2009 when he also beat the Swiss in the final round of group play before going on to reach the final.
"Now you have three big names in the semi-finals and one big guy," the 1.98m Del Potro told reporters after his second indoor victory over Federer in as many weeks.
Federer looked untroubled on his serve in the opening set against the 24-year-old but paid the price for failing to convert two break points that would have given him a 5-3 lead.
The 17-times grand slam champion then played an error-strewn tiebreak which Del Potro took 7-3.
Federer was immaculate in the second set, breaking to love in the opening game and dropping just five points on his own delivery as he set up a decider.
Just when it seemed a 13th consecutive victory was looming, however, Federer was broken out of the blue to trail 2-0 in the decider and Del Potro was rock solid thereafter.
"It's indoor tennis, he has a big serve and all those things. But still the surface plays somewhat slow so I expect myself to get more returns into play," Federer said of a rather toothless showing in the deciding set.
"But it's important to move on right now. Mentally, it's important to look ahead and rest because it's a quick turnaround till tomorrow."
Despite an impressive performance Del Potro played down his chances of landing his biggest title since winning the U.S. Open in 2009, also against Federer.
"I don't know who is the favourite," Del Potro, a finalist here three years ago, said. "Djokovic, Murray or Federer can win the tournament. I can tell you I'm the No. 4 for sure."
In doubles play, top seeds and three-times former champions Bob and Mike Bryan lost to India's Leander Paes and Radek Stepanek, meaning the Americans missed out on the semi-finals.
Paes and Stepanek won a match tiebreak 10-7 and will face Mahesh Bhupathi and Rohan Bopanna in the semi-finals.
In the other semi-final Britain's Jonathan Marray and Dane Frederik Nielson will play Spaniards Marcel Granollers and Marc Lopez.
Image: Juan Martin Del Potro of Argentina shakes hands at the net with Roger Federer of Switzerland after their men's singles match during day six of the ATP World Tour Finals at O2 Arena.
Photograph: Clive Brunskill/Getty Images