Shanghai: Roger Federer failed to reach the semi-finals of the Masters Cup for the first time after losing an extraordinary final group match 4-6, 7-6, 7-5 to Briton Andy Murray on Friday.
The 27-year-old Swiss, who was chasing a record-equalling fifth title, needed to win his final round-robin match to progress to the knockout stage but succumbed to the Scot's eighth match point after an enthralling three-hour contest.
"I don't quit once I step on court," said Federer, who had a stomach bug earlier this week and treatment to his back before the deciding set.
FAST FORWARD: Andy Murray reacts after defeating Roger Federer in the Masters Cup in Shanghai.
"My body was hurting, normally the best of three sets is peanuts and it's a shame I couldn't handle it today."
Murray, the only unbeaten player in the $4.45 million event, had already qualified for the last four and will meet Russian Nikolay Davydenko on Saturday for a place in the final.
"I'm going to be a bit tired tomorrow but a win over Roger Federer means almost as much as winning the Masters Cup to me," Murray, who improved to a 4-2 career record against Federer, told Sky TV.
France's Gilles Simon earlier beat Czech Radek Stepanek 6-1, 6-4 but faced an anxious wait before being confirmed as the fourth semi-finallist.
He will play Serbia's Novak Djokovic.
Federer, who had looked sluggish in his first two matches, was back close to his best in the first set, frequently coming into the net to disrupt the Scottish baseliner and grabbing a break for 3-1.
Murray, however, has been playing the best tennis of his life recently -- losing just once since his defeat to Federer in the US Open final in September -- and broke straight back to set the template for a match of attrition.
Federer clinched the set with his second break when Murray netted a simple volley but any thoughts that the 21-year-old would roll over to save his energy for the weekend were banished when he took a 5-2 lead in the second set.
The Swiss lost the world No. 1 spot this year and was not going to give up his Masters Cup crown easily, battling back with some flashes of brilliance to force a tie-break.
He fought back again after Murray took a 3-1 lead but the Briton was not going to give up either, evening the match up when Federer went long.
The third set was a blockbuster in itself, punctuated with long rallies and featuring tennis of the highest quality as well as frequent errors -- Federer made 65 and Murray 40 in the match.
Murray surged to a 3-0 lead in the decider but the Swiss reeled off four games in a row to go a break up himself before the third seed again responded with a break to level at 4-4.
The Scot then piled huge pressure on the Swiss when he was serving to save the match at 4-5.
Murray had seven match points in a game featuring 10 deuces but Federer saved them all.
Two games later, though, the 13-times grand slam champion went wide and exited the group stage of the Masters Cup for the first time in seven straight appearances.
The 23-year-old Simon won his ticket to the season finale when world No. 1 Rafael Nadal withdrew injured and beat Federer in their opening match.
Czech world No. 27 Stepanek came in at the last moment as a replacement for injured American Andy Roddick on Wednesday and struggled to contain the dynamic young Frenchman.