Sharapova had a high-profile first-round match at the U.S. Open two years ago, prevailing against second-seeded Simona Halep. That win is among the few bright spots in her post-suspension career, which has not seen her re-enter the top 20.

The winner of the Williams-Sharapova match will face either 88th-ranked Timea Bacsinszky, a former top-10 player, or Caty McNally, a 17-year-old American who reached the semifinals of the Citi Open in Washington this month. Hsieh Su-wei, a tricky Taiwanese veteran seeded 29th, looms in the third round. Anastasija Sevastova, who is seeded 12th and has reached the quarterfinals or better in each of the last three years at the Open, is a potential fourth-round opponent.

All these players share the bottom quarter of the draw with second-seeded Ashleigh Barty, this year’s French Open champion. Elsewhere in the bottom half are third-seeded Karolina Pliskova and fifth-seeded Elina Svitolina, who could face Venus Williams in the second round.

The defending champion and No. 1 seed, Naomi Osaka, leads the top half of the draw. Coco Gauff, the 15-year-old American who had a breakthrough performance at Wimbledon in July, could play Osaka in the third round. Gauff begins with a fellow teenager, 18-year-old Anastasia Potapova of Russia, and could then face No. 28 Carla Suárez Navarro.

Osaka, who retired from her quarterfinal match in Cincinnati last week because of an acute knee injury, sounded a note of optimism about being ready for the Open, saying she was “getting better” with her title defense only days away.

“I would say I’m a fast healer, so I’m banking on that,” she said onstage after the draws were completed. “I’m here and I feel as healthy as I can be.”

Among the other notable first-round matches:

No. 9 Aryna Sabalenka vs. Victoria Azarenka, the top two players from Belarus

Wimbledon quarterfinalist Alison Riske vs. No. 24 Garbiñe Muguruza, a two-time Grand Slam champion.

Denis Shapovalov vs. No. 18 Felix Auger-Aliassime, rising Canadian stars who also met in the first round last year

No. 8 Stefanos Tsitsipas vs. Andrey Rublev, who upset Roger Federer in Cincinnati last week.

Like Serena Williams and Sharapova, the longtime rivals Roger Federer and Rafael Nadal have never played each other at the U.S. Open. If that is to happen this year, it will have to be in the final. The third-seeded Federer was drawn into the top half of the draw with top-seeded Novak Djokovic, the defending men’s champion, who beat Federer in a classic Wimbledon final last month.