Andy Murray fought back to beat Kei Nishikori in a gruelling contest and close in on a semi-final place at the ATP World Tour Finals.
The world number one, 29, lost a tie-break but came through 6-7 (9-11) 6-4 6-4 against the Japanese fifth seed.
At three hours and 20 minutes, it was the longest match at the event since it moved to London in 2009.
Murray will face US Open champion Wawrinka in his final round-robin match on Friday.
The only way that Murray can be eliminated is by a straight-sets defeat for himself combined with Nishikori beating Cilic in the other Group John McEnroe match.
After an underwhelming defeat to Nishikori in his O2 opener, Swiss Wawrinka looked close to his best with his forehand proving especially potent.
Murray’s success was the first time since his debut in 2008 that the Briton has won his opening two group matches.
The victory, his 21st in succession, had added significance as Murray needs to at least match Novak Djokovic’s results in London if he is to stay ahead of the Serb in the year-end rankings.
Djokovic has a 2-0 record in the Ivan Lendl Group, as does the Scot in the John McEnroe Group, having beaten Cilic in his first match.
“It could come down to a match between me and Novak,” said Murray.
“Who knows what’s going to happen the next few days?
“I’ll concentrate on trying to win my own matches, get through as many as I can and make it as tough as possible for Novak to jump me.”
Murray became world number one for the first time earlier this November.
The Wimbledon champion erased the memory of his US Open quarter-final defeat by Nishikori in the most punishing manner.
“I feel OK right now, but it is the following day when you feel it often,” said Murray.
“Hopefully there will be another three days to this season and I’ll do my best to get through them.”
Nishikori, 26, deservedly took the opening set but only after an 85-minute tussle that saw both men create – and miss – numerous opportunities.
I eventually got over the line. These are the sort of matches you work so hard for.
Murray netted a forehand on set point before they headed into a remarkable tie-break, which saw the Scot recover from 6-3 down – saving the third set point with an outrageous backhand when all seemed lost.
Nishikori fended off two more set points, one with a spectacular smash, before converting his fifth chance when Murray found the tramlines.
The 16,000 spectators buzzed with excitement but there were signs that the players were understandably flagging as the match wore on.
Murray could not hold on to an early break in the second set, with Nishikori breaking serve for the first time after two hours to make it 4-4, but the Briton toiled his way through the next two games to level.
A net cord helped Murray get the crucial first break at 2-1 in the deciding set, but even with a 5-1 lead there were more twists to come.
Nishikori discovered a burst of energy to peg Murray back to 5-4, but the top seed found his range when he needed it to serve out the match at the second time of asking.
“I eventually got over the line,” added Murray. “These are the sort of matches you work so hard for.”.
“Murray needed his resilience to get through. Winning breeds winning – that was his 21st straight victory – and that helped get him over the line.”