Williams’ defeat came hours after Roger Federer withdrew from the tournament, saying he needed to let his body recover after a long third-round victory.
Williams has won 23 Grand Slam titles and Federer has won 20. Both turn 40 this year.
Williams has won the French Open three times. But the American hasn’t been past the fourth round here since she was the runner-up in 2016.
This was the 64th time Williams has appeared in that round at a major tournament.
It was the first such match for Rybakina, a 21-year-old from Kazakhstan who is ranked 22nd.
Sunday wasn’t all bad for veteran players.
Former Wimbledon champion Marion Bartoli, who was doing the courtside interview, congratulated her.
“It’s just incredible, even that I’m still playing tennis such a long time after,” she told her friend Bartoli. “It’s a surprise for me. I fought hard and I’m very happy to win.”
The 29-year-old Russian has reached the quarters at the Australian Open and Wimbledon, but has never reached the semifinals at any major.
She will face Rybakina next.
The former top-ranked Azarenka saved two break points before clinching the first set on a sunny Court Philippe-Chatrier, where the crowd was subdued. Less so the broadcast crew from France Television, whose presenter and guests are perched up high above the players. The match umpire asked them, during the second set, to talk more quietly as their enthusiasm got the better of them.
Azarenka got a telling off, too, of sorts: a time violation warning for taking too long to serve in the third game of the deciding set — which, coincidentally, happened just as the wind was picking up.
Tamara Zidansek, meanwhile, became the first Slovenian woman to reach the quarterfinals of a major.
She won 7-6 (4), 6-1 against Romanian Sorana Cirstea after saving a set point in a tight first set between the unseeded players.
Zidansek, 23, dropped to her knees and held her head in her hands after winning on her first match point.
Zidansek’s run is even more impressive, considering the former snowboarding enthusiast had never beaten a top 10-ranked player before this tournament or been past the first round here.
Information from The Associated Press was used in this report.