Both returned from maternity leave a year ago at the desert tournament. Since then, Williams has reached two Grand Slam finals and returned to the world's top 10. Azarenka is ranked No. 48. "It's been an arduous road," Williams said. "I think we both really appreciate both of our efforts to do the best that we can do."
Azarenka is still seeking to restore order in her personal life, having been involved in a legal tussle over her young son. At 1-1, there were four straight service breaks by the hard-hitting baseliners. The 23-time Grand Slam winner led 5-3 with a chance to serve out the first set before Azarenka staged a rally.
The Belarusian held at love for 5-5 before Williams staved off four break points for 6-5. The 37-year-old Williams hit back-to-back return winners at 30-30 to break her opponent for the fourth time and win the set in 1 hour, 12 minutes.
At 4-3 in the second set, Williams hit a cross-court return winner and Azarenka dropped a backhand into the net. Williams needed three match points to close it out on two strong serves. She finished with four aces, nine double faults and saved 11 of 15 break points. They met for the first time since their 2016 final at Indian Wells, which Azarenka won.
"As much as she's the toughest opponent I have ever played in my life, she's my favorite person to play against," Azarenka said. "Why I still play is because I enjoy the challenges. If it's easy, if it's boring, I don't want to play."
The women shared an embrace at the net afterward. "She's a very good friend. I would say we're pretty close," Williams said. "We're both moms, and we know how hard it is and how hard it's been for us to come back, you know, and starting literally from scratch."
Williams will face No. 20 Garbine Muguruza in the next round. Earlier, Sloane Stephens lost to Stefanie Voegele of Switzerland 6-3, 6-0 in just more than an hour. The fourth-seeded American committed 32 unforced errors, while Voegele had four aces playing in windy conditions. Voegele improved to 4-1 against the 2017 U.S. Open champion.
No. 2 seed Simona Halep beat Barbora Strycova 6-2, 6-4. Other seeded winners were: No. 7 Kiki Bertens, No. 12 Ashleigh Barty, No. 16 Elise Mertens, No. 22 Jelana Ostapenko and No. 18 Qiang Wang. Stephens wasn't the only seed to be ousted on the women's side.
No. 14 Daria Kasatkina, a finalist last year, lost to Marketa Vondrousova 6-2, 6-1; No. 19 Caroline Garcia lost to Jennifer Brady 6-3, 3-6, 6-0; No. 27 Su-Wei Hsieh was beaten by Johanna Konta 6-0, 6-2; and No. 29 Mihaela Buzarnescu lost to Daria Gavrilova 6-2, 6-2.
Bianca Andreescu, an 18-year-old Canadian, beat No. 32 Dominika Cibulkova 6-2, 6-2. In men's opening-round matches, Steve Johnson beat fellow American Taylor Fritz 6-3, 6-3, and Stan Wawrinka edged Daniel Evans 6-7 (4), 6-3, 6-3. Also advancing were Feliciano Lopez and Hubert Hurkacz.
American Mackenzie McDonald got by Joao Sousa 6-4, 3-6, 6-3. Novak Djokovic, the world's top-ranked player, won his first-round doubles match with Fabio Fognini. They beat Jeremy Chardy and Milos Raonic 7-6 (5), 6-1.
More AP Tennis: https://www.apnews.com/apf-Tennis and https://twitter.com/AP_Sports