Naomi Osaka is grinding her way through the French Open the hard way.

To cling onto her quest for a third consecutive Grand Slam title, the top-ranked Osaka again had to rally from first-set woes to beat former No. 1 Victoria Azarenka 4-6, 7-5, 6-3 Thursday in the second round.

Serena Williams and Novak Djokovic also advanced, with far easier straight-set wins.

Osaka considered herself unfortunate to be drawn against Azarenka and the powerful, accurate tennis produced by the 29-year-old Belarusian playing in her 12th French Open showed why.

Although now ranked No. 43 and without a major title since winning the Australian Open in 2012 and 2013, Azarenka took a 4-0 lead on Court Suzanne Lenglen and kept Osaka under constant pressure.

"I got rolled," Osaka said. "She kind of killed me in the first set."

Broken by a backhand volley at the net from Azarenka in the fifth game of the second set, the U.S Open and Australian Open champion from Japan seemed to be in deep trouble. But, as she did against first-round opponent Anna Karolina Schmiedlova, Osaka again proved her resilience.

"I didn't stop trying at all," Osaka said. "Every point was kind of, like, pedal to the metal."

The eighth game of the second set was pivotal. After saving two break points, Azarenka doubled-faulted. Osaka leveled at 4-4 and the momentum started to shift. It was the seventh break point Azarenka had faced in the set, and the first she had failed to save.

But Azarenka still saved three set points before Osaka finally leveled the match with a backhand cross-court winner.

The third set was packed with drama, too, with Osaka finally taming Azarenka with her third match point, when her combative opponent hit long.

Azarenka, still working her way back into the upper echelons of the game after injuries, a pregnancy and a custody battle over her child, said she would learn from the defeat.

"I know what I need to do better, so it keeps me optimistic, and I do enjoy this. No matter how hard it is, it's my path that I'm going to walk with my head held high," she said.

Osaka's next opponent, 42nd-ranked Katerina Siniakova, hasn't been past the third round in her 18 previous Grand Slam tournaments.

Williams will play Sofia Kenin, an American ranked No. 35, in the third round. The 23-time major champion defeated Japanese qualifier Kurumi Nara, 6-3, 6-2 to advance.

Djokovic notched up another career milestone: His young son, Stefan, watched him play, and win, at Roland Garros for the first time. The top-ranked player bidding to win his fourth consecutive major beat 104th-ranked Henri Laaksonen 6-1, 6-4, 6-3.

Djokovic will play 147th-ranked Salvatore Caruso of Italy in the third round.

Also, Dominic Thiem overcame some trickery from Kazakh opponent Alexander Bublik to advance to the third round with a 6-3, 6-7 (6), 6-3, 7-5 victory.

Bublik surprised Thiem with an underarm serve in the first set and frustrated the Austrian with a series of drop shots, spins and volleys. But last year's finalist at Roland Garros recovered from a break of serve in the fourth set and then gave Bublik a taste of his own medicine on his first match point, producing a well-disguised, and successful, drop shot.

Thiem will next face Pablo Cuevas, another master of trick shots. Cuevas was leading 7-6 (3), 6-3, 2-1 when Kyle Edmund retired from their match because of a left knee injury.