David Ferrer recovered from a set down to beat fellow Spaniard Rafael Nadal in an absorbing Masters Cup contest.
Ferrer has one foot in the semi-finals after two group wins
World number two Nadal took the first set in Shanghai but in a match between two of the game's most ferocious competitors, Ferrer fought back.
Nadal rallied from 5-1 down to make it 5-3 in the decider, but Ferrer held his nerve to triumph 4-6 6-4 6-3.
Ferrer, who also beat Nadal at the US Open, has now won both his Gold Group matches to close in on the semi-finals.
Afterwards, Nadal was full of praise for Ferrer.
"David is playing with unbelievable confidence and moving unbelievable, just crazy," he said.
"No excuse. This is the toughest tournament of the year. Anything can happen. I didn't play a bad match. I played well. He played better."
Nadal's surprise defeat came a day after world number one Roger Federer was stunned by Fernando Gonzalez in the Red Group.
GOLD GROUP STANDINGS
Ferrer P2 W2 L0 F4 A1 Pts 2
Gasquet P2 W1 L1 F3 A2 Pts 1
Nadal P2 W1 L1 F3 A3 Pts 1
Djokovic P2 W0 L2 F0 A4 Pts 0
Nadal must now beat Serbia's Novak Djokovic in his final group match to have any hope of qualification for the semi-finals.
Djokovic cannot reach the last four after a 6-4 6-2 loss to Richard Gasquet.
The Serb was off the pace throughout - as he was in Sunday's defeat to Ferrer - and made 27 unforced errors.
Gasquet lost his opening match to Nadal but could still make the semi-finals. He plays Ferrer in his final group match on Thursday.
The Frenchman will be refreshed for that challenge after beating Djokovic in just 85 minutes.
Gasquet showed off his dazzling backhand time and again against a lacklustre opponent.
He quickly established a 4-1 lead in the first set, and though Djokovic did break back once, Gasquet coolly served out the set.
The world number eight broke serve again at 2-2 in the second set, triggering a hasty collapse from the 20-year-old Serb.
Djokovic, who has suffered four straight defeats, blamed fatigue after playing more than 100 matches in a breakthrough year.
"Unfortunately again, I couldn't be even close to my level," he said.
"I was frustrated because of that. I didn't feel so well physically, and mentally I just couldn't be so confident on the court. I didn't find any solutions."
Federer, who faces Nikolay Davydenko on Wednesday, was honoured on Tuesday for finishing the season as number one.
The Swiss, who has won three Grand Slam titles, held off Nadal's challenge to win the ATP Champions Race for the fourth consecutive year.
"This year was very special because I was behind Nadal and won it back," said Federer in an on-court ceremony in Shanghai.
"It's an amazing run I'm on and I'll try my best to maintain it in 2008."
ATP Masters Cup, Shanghai, 11-18 November:
Roger Federer (Swi)
Andy Roddick (US)
Nikolay Davydenko (Rus)
Fernando Gonzalez (Chi)
Rafael Nadal (Spa)
Novak Djokovic (Ser)
David Ferrer (Spa)
Richard Gasquet (Fra)