Serena Williams overcame physical difficulties, emotional distress as well as a stubborn opponent in Jelena Jankovic before reaching the final of the WTA Championships with a 6-4, 2-6, 6-4 win.
The world number one will tackle Li Na, the first Chinese player to reach the title match, after the former French Open champion defeated Petra Kvitova, 6-4, 6-2.
It was a harrowing, stumbling performance by titleholder Williams over former world number one Jankovic, for she appeared to have problems with her movement and twice sat weeping into her towel during change-overs.
She also committed 40 unforced errors amidst her 40 winners, and allowed a 5-1 final set lead to evaporate to within one point of 5-5 before finishing it with three trademark heavy blows.
"Last night I was lying down and I hit a wall," said Williams, presumably figuratively speaking.
"And since then I have had no energy. In the match I was struggling for energy to play at all. I have played a tremendous amount of matches and it isn't easy."
She added: "I'm just relieved and just glad to be in the final."
It was evident immediately that all was not well with 32-year-old Williams on Saturday.
She dropped her second service game and went 1-3 down, and although she recovered with some stunning ground strokes she rarely served at full power and often looked ponderous and laboured.
It got worse in the second set as the errors flowed more frequently, which encouraged Jankovic to raise her level.
The Serbian defended stoutly and was at times able to counter-attack, breaking for 3-1 again but this time extending it to 5-1 and 6-2.
During this phase Williams looked capable of drifting to defeat.
She responded to her mistakes with gestures of dismay, slumped shoulders and despairing staggers, and seemed capable of compounding shot-making uncertainty with an unpredictable emotions.
Her mother Oracene sat with her head tilted on one side, while her coach Patrick Mouratoglou combined withdrawn expressions with sudden gestures of triumphal support.
In the end, when Williams' four-game final set lead all but disappeared, it was only the sheer power of her ball-striking ability and her desire to survive which prevailed but it was a close run thing.
"Physically I was fine," she said, before adding, in contradiction: "I was so tired, even when standing.
"After a while I felt a big rush of air come out and I knew I had to really pull that match round. I don't know how I did it.
"My legs wouldn't move, my arm wouldn't go fast. I think when you are doing something so much for so long during the year it takes a toll. I was just fighting to stay in there, to get my legs to get to the balls.
"I told myself to stay out there and just fight for every point."
She may need to raise her level to hang on to the title.
Li Na gave further evidence of a remarkable late-career surge during her performance against Kvitova, which followed very good wins over Victoria Azarenka and Jankovic.
Already the first Chinese singles player to win a Grand Slam, the 31-year-old is now assured of a season-end highest ever ranking of at least world number three, and her latest performances suggest she is still improving at an age when many players are deemed to be in decline.