David Nalbandian of Argentina has defeated Switzerland's Roger Federer in a nail-biting five-set final at the Masters tennis tournament in Shanghai.
In a match lasting more than four and a half hours, Nalbandian won 6-7, 6-7, 6-2, 6-1, 7-6.
Nalbandian produced a stunning fightback to shock the world number one player and win the tournament, which marks the end of the 2005 tennis season.
He looked dead and buried after going two sets down but hit back with some startling tennis as an exhausted Federer faded in the next two sets.
The Swiss fought back from 4-0 down in the fifth and final set and was serving for the championship at 6-5. But the Argentinian player fought back again to force a decisive tiebreak.
Nalbandian, the first player from Argentina to reach the final since Guillermo Villas took the title in 1974, won it 7-3 to seal victory.
Federer, playing his first tournament since injuring his ankle last month, had before Sunday's defeat won his last 35 matches.
The Swiss star, who had won his previous 24 finals, walked off court and slumped into a chair. His sequence of 14 wins at the Masters Cup ended one short of his third straight title at the event.
"It's been a fantastic year... unfortunately I couldn't win the last one but this year will be a great memory for me," said Federer.
"To be back after the injury - I'm happy I made it so far. I'm proud of that. But the better guy won today. He was way better in the third and fourth and fifth. He totally deserved to win."
Federer had only once lost a best-of-five set match after leading 2-0 to Australia's Lleyton Hewitt in the 2003 Davis Cup semi-final.
Nalbandian took advantage of Federer's recent lack of match practice.
The 23-year-old player made Federer run to the net constantly, using slice backhands and drop shots to draw him in, then whipping winners back past him.
Federer needed treatment on his left thigh after the fifth game of the fourth set, and told the trainer he was almost exhausted.
Sunday's final was the only scheduled best-of-five set match in the tournament. Federer dropped a set as he won his three round-robin matches, then notched up a 6-0, 6-0 semi-final win over Gaston Gaudio on Saturday – the first so-called "double bagel" in his career.
It was also the first love-love result at the tournament, which began in 1970. But the game-winning sequence stopped in the first on Sunday, when Nalbandian broke Federer's serve to open the final.
After trading breaks in each of the first two sets and clinging on in tiebreakers, Federer won only three games in the third and fourth sets.
He was clearly off colour, twice giving Nalbandian break-point chances with double faults in the fifth set and once surrendering a break with a double fault.
Groups of fans at the Qi Zhong Stadium wearing red-and-white Swiss flag shirts willed Federer back into the match.
After winning only five points in the first four games of the fifth set, Federer broke Nalbandian twice and held twice to pull level at 4-4.
Nalbandian, who has never won a Grand Slam singles title and was appearing at the Masters Cup for only the second time, was broken in the 11th game and went behind 30-0 in the next as Federer won five consecutive points.
But he won the next six to force a tiebreaker and then lead it 2-0.
Federer missed a volley to fall behind 4-2 at the change of ends and hung his head. He only won one more point.
swissinfo with agencies
Federer was defeated in the final of the Masters tournament in Shanghai in five sets: 7-6, 7-6, 2-6, 1-6, 6-7.
Earlier in the event, he had defeated Ivan Ljubicic of Croatia and Guillermo Coria of Argentina.
He hammered Gaston Gaudio of Argentina on Saturday in two sets: 6-0, 6-0.
The Masters tournament brings together the best eight players of the world to end the tennis season.
Several top players were absent from this year's event: Rafael Nadal, Marat Safin, Lleyton Hewitt, Andy Roddick and Andre Agassi.
Federer, who dominates world tennis, ends his season with 11 trophies, including wins at the United States Open and Wimbledon.
In 2005, he won 81 matches and was defeated four times. Before Shanghai he had not lost since May (semi-final of French Open). Since then and despite a pause of a month after an ankle operation, he had won 35 successive matches.