RIO DE JANEIRO (AP) — Out of sorts and out of answers, defending champion Serena Williams is out of the Rio de Janeiro Olympics.

Shanking shots of all sorts, including five — yes, five! — double-faults in one game alone, Williams lost to Elina Svitolina of Ukraine 6-4, 6-3 in the third round in a real shocker Tuesday, ending the No. 1-seeded American's bid to become the first tennis player to collect a pair of singles golds.

"It didn't work out the way I wanted it to," Williams said.

Facing an unheralded opponent who at times couldn't seem to miss, Williams had problems right from the start, when she got broken to fall behind 2-1 with a badly missed overhead into the net.

That set a pattern.

By the end, Svitolina had won 63 points, but merely nine came via clean winners of her own doing. The others came thanks to Williams' 37 unforced errors and 17 forced errors.

"The better player won," said Williams, who did not take questions from the media after the match and instead did a brief interview with a U.S. Tennis Association spokesman who shared the audio with reporters.

After winning golds in singles and doubles at the 2012 London Olympics, Williams heads home from Brazil with nothing. She and her older sister Venus, who sat in the stands Tuesday, lost in the first round as the No. 1 seed in women's doubles — their first defeat in the Olympics after going 15-0 with three golds.

Of the four tennis events under way in Rio — mixed doubles hasn't started yet — all four No. 1 seeds are gone, including Novak Djokovic in men's singles.

No one in the history of Olympic tennis has ever won two gold medals in singles, and while Williams won't achieve that this week, Andy Murray or Rafael Nadal still could.

Both moved into the third round Tuesday. Neither has been tested much, dropping a total of nine games apiece so far.

This is Nadal's first tournament since he pulled out of the French Open in May with an injured tendon sheath in his left wrist, and the No. 3 seed wasn't even sure he would compete until testing his arm once he arrived in Brazil. Still, everything is going exactly to plan for the owner of 14 Grand Slam championships and the 2008 Beijing Olympic title, who beat Italy's Andreas Seppi 6-3, 6-3.

"Not much pressure for me," Nadal said. "Two months without competing, I don't expect much."

Murray, who won gold at the 2012 London Games and is seeded No. 2, breezed past Argentina's Juan Monaco 6-3, 6-1.

The women's quarterfinals are set: Svitolina vs. Petra Kvitova of the Czech Republic; Angelique Kerber of Germany vs. Johanna Konta of Britain; Madison Keys of the U.S. vs. Daria Kasatkina of Russia; and Monica Puig of Puerto Rico vs. Laura Siegemund of Germany.

No. 3 Garbine Muguruza, who beat Williams to win the French Open title, also lost Tuesday, 6-1, 6-1 against Puig.

The 20th-ranked Svitolina never before played in the Olympics and only once has been to a major quarterfinal. She also entered the night 0-4 against Williams, an owner of 22 Grand Slam singles championships.

"Unreal feeling," Svitolina said after the biggest win of her career, adding: "It's so special to beat her here."

Their most recent match came at the French Open, and Williams won 6-1, 6-1.

Give credit this time to Svitolina, who played a fearless brand of big-strike tennis, sending deep groundstrokes off both wings toward lines and managing to put most right where she wanted them.

"I'm really happy I could take risks," Svitolina said.

She ended the first set with an ace and a blank stare, as if this were no big deal and she knew she would do this all along.

Afterward, she sounded as if she did.

"I was expecting that I can play well, as well, and just push her to her limits," Svitolina said. "Obviously, she was not playing well today."

After 45 minutes, she was up a set and a break at 2-1 in the second. She got to break point with a big forehand that forced an errant forehand from Williams, then converted with an inside-out forehand return winner off a 97 mph (157 kph) second serve.

When she held in the next game, it was 3-1, and Svitolina was merely three games from a monumental upset.

But Williams did not go quietly.

Screaming "Come on!" after some points and "Ahhhh!" after others, waving her arms either to celebrate or remonstrate herself, she held, then broke, to pull even at 3-all in the second set. And then one of the greatest fighters in her — or any other — sport simply faded down the stretch.

Oddly so, too, with that five-double-fault game; she finished with eight. At one point in the game that ended with her getting broken to trail 4-3, Williams leaned forward and tapped her racket twice against the court. She did, however, refrain from smashing it the way she had a night earlier, cracking the equipment against her sideline chair during a ragged first set.

On Monday, Williams managed to turn things around, as she so often does. This time, though, she never could.