Gutsy Venus Williams saved five match points before her 21st US Open campaign came to end, but her sister Serena is still involved after surviving a real scare against teenager Caty McNally.  

Serving to stay in the match, the 39-year-old Venus showed her never-say-die spirit remains undimmed in a marathon penultimate game against Ukrainian Elina Svitolina.

The two-time champion forced Svitolina to serve for the match, the Ukrainian fifth seed eventually crossing the line for a 6-4 6-4 victory.

"It was a really incredible match," said Svitolina. "It was really special. It's unbelievable what Venus does, on and off the court she is a big inspiration.

"I had to stay very focused and try to put an extra ball over the net. She knows how to handle moments like this, it was incredibly tough and only a few points decided the match."

Serena Williams won her first US Open two years before Caty McNally was born - and she had to use all her experience to avoid crashing out to the 17-year-old.

Williams, the 23-time grand slam winner and last year's runner-up, found herself staring down the barrel of a major upset against her fellow American.

McNally, standing up to Williams' second serve, had the 37-year-old on the ropes when she took the first set.

But Williams dug deep in a dramatic late-night session in New York to win 5-7 6-3 6-1 and progress to the third round.

"I think she really came out and played well, she showed no fear, she had nothing to lose and she played like it," said a relieved Williams.

"It's refreshing, and it's a different game. I don't get to play players like that too often." 

 Serena Williams shakes hands with Catherine McNally

Madison Keys eased through, recovering from a slow start and an early loss of serve to beat China's Zhu Lin 6-4 6-1 on Wednesday.

The 10th-seeded Keys, who lost in the 2017 U.S. Open final to fellow American Sloane Stephens, struck 31 winners in front of an enthusiastic home crowd.

Zhu, who exited the first three Grand Slams of the year in the first round, converted two of three break point opportunities but struggled to cause problems for her opponent.

"I think she came out and she was playing really well," Keys said of Zhu. "I just kind of stuck to my game and knew that I'd have and opportunity and stayed calm."

She will face either Germany's Laura Siegemund or 20th seed Sofia Kenin of the United States in the third round.

Third seed Karolina Pliskova is also through to the third round, the 27-year-old from the Czech Republic beating Georgia's Mariam Bolkvadze 6-1 6-4.

Second seed Ashleigh Barty beat Lauren Davis of America 6-2 7-6.