World number one Novak Djokovic is out of the ATP World Tour Finals after suffering a shock defeat by Janko Tipsarevic.
His loss coupled with Tomas Berdych's three-set win over David Ferrer means the Serb has failed to qualify for the semi-finals.
Djokovic lost 3-6 6-3 6-3 to his compatriot in two hours and seven minutes.
Tipsarevic, a replacement for the injured Andy Murray, had no chance of reaching the last four but came from behind to secure arguably the biggest win of his career.
Although Djokovic dominated his good friend in the first set, he looked exhausted towards the end of the second and his struggles continued in the decider.
It seemed the exertions of an incredible 2011 had finally caught up with the 24-year-old as he slipped to only his sixth defeat in 76 matches. It is the first time he has lost back-to-back matches since March 2010.
Injuries restricted top seed Djokovic to just eight matches between the US Open and year-end championship, and despite an excellent first set he toiled badly as the match wore on.
Tipsarevic has hit a purple patch of late, winning in Kuala Lumpur to lift his first ATP title, collecting another in Moscow and reaching the final in St Petersburg.
He was under pressure from the outset and after two Djokovic errors let him off the hook in game two, a wayward backhand saw him fall 3-1 behind.
Djokovic confidently maintained his advantage and served out the opener with a sensational inside-out forehand winner to cap a service hold to love.
The flat atmosphere among the crowd and lack of bite between the players - Davis Cup team-mates - suggested the second set would be a formality.
However, Djokovic's fitness and focus deserted him and Tipsarevic was able to capitalise.
He battled brilliantly to come through a 12-minute first game, discarding his baseline tactics to volley himself into a 1-0 lead.
Djokovic was now labouring and a limp backhand into the net put Tipsarevic 4-2 ahead.
He managed to break back in game seven but was immediately pegged back and Tipsarevic swiftly levelled the contest.
Likely victory had turned into likely defeat for Djokovic and his defences were breached once more early in the third set, Tipsarevic punishing his opponent in several gruelling rallies.
By contrast, Tipsarevic was never troubled on his own delivery and Djokovic netted an easy forehand to hand over another break and the match.
Djokovic said: "What is missing is that freshness. The will to win, just being on the court, giving 100%. I'm not able to do that now because I just have very little left.
"I've had an unbelievable year. Nothing can really ruin that. I will always remember this year as the best of my life."
Tipsarevic, who had lost each of their three previous meetings, said: "Not trying to undermine my performance or my victory, but I can freely say this was not Novak Djokovic from the US Open or Wimbledon.
"Still, I managed to beat the world number one and no-one can take that away from me."
In the doubles, Austria's Jurgen Melzer and German partner Philipp Petzchner beat Swedish-Romanian pair Robert Lindstedt and Horia Tecau 6-3 6-4 but they failed to qualify for the semi-finals after Mahesh Bhupathi and Leander Paes beat Bob and Mike Bryan to win the group.
They booked their place in the semi-finals with a shock 6-4, 6-2 win over the top seeds.
The Indian duo, who are ending their partnership after this tournament, knew only a win would keep alive their hopes of qualification and now they face Mariusz Fyrstenberg and Marcin Matkowski in the semi-finals on Saturday.
In the other semi-final the Bryan brothers will take on Max Mirnyi and Daniel Nestor.