NEW YORK — Second-seeded Ash Barty overcame a slow start and a shaky serve to survive a first-round scare on a packed opening day of the US Open.

Barty, the French Open champion, amassed 36 unforced errors and got less than half her first serves in en route to a 1-6, 6-3-6-2 victory Monday over 80th-ranked Zarina Diyas of Kazakhstan.

The Australian lost the first set in a mere 28 minutes and did not begin to come alive until the match was knotted at 3-3 in the second. She went on to win nine of the last 11 games, ending the match when Diyas sailed a forehand long.

“I was happy with the way I was able to fight through after a pretty awful start,” Barty said. “Not the ideal start. Not the perfect start. But it is what it is.”

Barty’s match helped kick off an opening day slate that includes eight former US Open champions, including top-ranked defending champion Novak Djokovic, Roger Federer and Stan Wawrinka. The main event is the opening night match on Arthur Ashe Stadium, when Serena Williams is set to take on Maria Sharapova at the US Open for the first time. Williams has won 23 Grand Slam singles titles, Sharapova five.

Third-seeded Karolina Pliskova also struggled in her opener, overcoming 32 unforced errors to win her first-round match over Czech qualifier Tereza Martincova 7-6 (6), 7-6 (3).

And Kristina Mladenovic of France defeated No. 14 seed and 2016 US Open champion Angelique Kerber 7-5, 0-6, 6-4. Kerber’s first-round loss follows second-round exits at both the French Open and Wimbledon this year.

In other results, No. 12 seed Anastasija Sevastova beat Eugenie Bouchard, a former Wimbledon finalist and top-10 player, 6-3, 6-3. Former Olympic gold medalist Monica Puig fell by the same score to Rebecca Peterson of Sweden. And Russian Ekaterina Alexandrova defeated 2011 US Open champ Samantha Stosur 6-1, 6-3.