Venus Williams sat on the sideline bench with her head down. She was breathing heavily, and she had her hands laid out flat on either side of her, as if she needed a little extra help to sit up straight.

Her exhaustion was understandable. Venus’s match against Jelena Ostapenko had just entered its third hour. It was the first epic of this year’s WTA Finals, and, at three hours and 13 minutes, it would be the third-longest match at the event in the last 10 years. The two women would hit 84 winners, commit 69 errors, combine for 20 breaks of serve, and show off every facial expression in their repertoires. Each game seemed to go to deuce, and no lead was safe for more than a minute.

Williams and Ostapenko had lost their opening matches in Singapore, which meant that if either harbored hopes of advancing to the semifinals, it was do or die time—and they played like it. When Ostapenko lost her serve at 5-5 in the third, she slammed the ball to the court and walked to the sideline in a bug-eyed rage. When Venus won the following game, and the match, she didn’t smile or leap happily, the way she usually does after a victory; that wouldn’t have done this effort justice. Instead, she channeled her sister Serena and fired a furious, triumphant, clenched fist in the direction of her team.

This was the type of litter-up-the-stat-sheet affair that can happen when two power players meet on a slow court. Williams and Ostapenko rifled their share of winners, but they also ran down their share of balls; the upshot was that neither of them could dominate with her serve, or build much momentum. Venus stole the first set by coming back to win from 5-3 down to win it 7-5. Ostapenko stole the second by saving a match point at 4-5 and winning it in a tiebreaker.

At 37, Venus obviously had the edge in experience over her 20-year-old opponent. Experience, though, is no guarantee of victory, especially when it’s up against the go-for-broke bravery of youth. But at 5-5 in the third, Venus finally used it to her advantage. After Ostapenko serves, she often moves slightly to her left, to give herself more room for a forehand on the next shot. Twice at 5-5, Venus sent her backhand return down the line, into the court that Ostapenko had left open. Twice she won the point.

After breaking for the 11th time, for 6-5, Venus propped herself up on the sideline long enough to survive the changeover. She had been broken nine times in this match, but with victory in sight, she calmly stepped forward and played her best tennis of the night. She made five straight first serves, and held with a backhand winner for a 7-5, 6-7 (3), 7-5 win.

Venus said that Ostapenko is a difficult opponent because she hits “shots that you can’t prepare for.” Coming into this contest, and this tournament, I wondered how prepared Venus would be. She’s at least 10 years older than the other seven women in Singapore, and 17 years older than her opponent today; she hadn’t played this late into a season since 2009; and she had won just one match since the US Open. In her first press conference, Venus hadn’t sounded thrilled about the slow surface, and she didn’t look comfortable on it in her straight-set opening loss to Karolina Pliskova.

But that’s the way it has always been with Venus Williams: When you start to think about counting her out, that’s when you should count her back in. She’s all-in in Singapore now.