NEW YORK, NY, USA -- Six-time champion Serena Williams of the United States got through a stern challenge in the second round of the US Open on Wednesday night, overcoming a spirited effort from American teenager Catherine McNally before ultimately pulling off a 5-7, 6-3, 6-1 victory.

"I think it's great because I want to be able to win matches where I'm not playing my best, play players who are playing great, be able to come through," Williams stated, in her post-match press conference. "I need to be tested, I guess."

No.8 seed Williams kept her perfect record in second-round matches at the US Open intact, improving to 19-0 in this round at this event -- two nights after reaching 19-0 in US Open first-round matches with her opening-night victory over Maria Sharapova.

Williams said she "definitely treasure[s]" her ability to gather herself mid-match "because it's important to have. I've won so many Grand Slams because of it. I also won a lot of Grand Slams not having to use it.

"Obviously I would be so lying if I said I enjoy the tough matches more, but I think, looking back years later, I enjoy the tough matches more. But in the moment, in the weeks after, it's definitely a different feeling."

Former World No.1 Williams finished the one-hour and 54-minute match with 32 winners, including ten aces, to 28 unforced errors. Williams won a sterling 81 percent of points on her first service, and broke McNally four times out of 12 break points.

"I made so many errors in the first two sets," said Williams. "It was just too many. You can't win tournaments making that many errors. I knew I had to play better, and I knew I could."

17-year-old McNally is having a breakthrough summer after a singles semifinal and a doubles title alongside Coco Gauff at the Citi Open in Washington, D.C., and is currently ranked at a career-high World No.121. Against Williams, McNally had 16 winners, including eight aces of her own, but finished with 30 unforced errors overall.

"You don't play players like her that have such full games," Williams said of McNally. "I think she just overall played really well."

The opening stages of the first set were replete with routine service games, as Williams and McNally both had no trouble holding onto their deliveries. Williams dropped only one point in her first three service games, but she was unable to reach a break point in the first half of the set as McNally was hitting her targets with pinpoint precision.

Neither player gave an inch up through 5-5, as the youngster hung with Williams with aplomb. In that game, it was McNally who became the first player to garner a break point after back-to-back forehand errors by the former World No.1. On her first chance, McNally fired a stunning forehand return to force an error from Williams and take an eye-opening 6-5 lead.

Serving for the set, McNally blinked, hitting a double fault and a long miscue before Williams crushed a backhand pass to reach triple break point. McNally’s all-court game, however, helped her stave off all three of Williams’s chances. Williams fended off McNally's first set point with a huge service return, but the teenager converted her second opportunity with a stellar serve returned wide.

Williams, though, expectedly upped her game in the second set as she fought to stay in the tournament. The long-time former World No.1 got another look in on the McNally serve as errors from the teenager gave Williams two break points at 3-2. Strong volleying by McNally saved one of those chances, but Williams whizzed a return winner past McNally on the second to lead 4-2.

Williams got through a two-deuce game to hold for 5-2, closing that game with a winning volley of her own. McNally then had to use all of her grit to extend the set, saving four set points in her subsequent service game, before once again wrapping up a service hold with exceptional forecourt skills.

However, Williams was undaunted by her missed chances, and crushed an ace in the next game to queue up her fifth set point. There, an amazing rally was ended by a Williams winner, to level the match at one set apiece. A much more precise Williams had more than doubled her winners from the first set to the second (17 to eight) while cutting her unforced errors from 15 to 11.

In the end, Williams cruised through the final set, dropping only five points in the decider. The 23-time major champion claimed 16 of the first 17 points of the set as she slid to a 4-0 lead, before McNally could end the run of games by holding routinely for 4-1.

Williams continued to race through the third set, holding at love for 5-1 after McNally missed a volley long on game point. In the next game, Williams concluded an amazing rally with an error-forcing crosscourt backhand to give herself triple match point. The six-time US Open champion needed only one, as she cracked a forehand service return for a clean winner.

23-time Grand Slam champion Williams will face another wily player in the third round: either No.29 seed Hsieh Su-wei of Chinese Taipei or rising Czech Karolina Muchova.