Roger Federer suffered one of the more shocking defeats of his career on Saturday, losing to a qualifier ranked 175th in a result that will also cost him the No. 1 ranking.
Thanasi Kokkinakis, who needed a wild card just to get into the qualifying rounds of the Miami Open, stunned Federer, 3-6, 6-3, 7-6 (4), in the second round in front of a large crowd that tried to will Federer to victory.
Federer, the defending champion, will cede the No. 1 spot to the current No. 2, Rafael Nadal, when the new ATP rankings come out on April 2.
“I deserve it after this match,” said Federer, 36, who returned to No. 1 last month and became the oldest player to hold the top spot. “That’s how I feel. It’s so bad.”
Federer also announced that he would not play any clay-court tournaments this year, including the French Open. It is the same strategy he employed last year in order to concentrate on Wimbledon, which he won for the eighth time over all and the first time since 2012.
He said the decision was made before Saturday’s startling loss, which made Federer the latest in a string of big-name departures at this year’s Miami Open.
Novak Djokovic and Serena Williams also lost their opening matches here. Djokovic fell to Benoit Paire on Friday, and Williams lost to Naomi Osaka, the winner at Wells last week, on Wednesday.
Simona Halep, the No. 1 seed in the women’s draw, also suffered a surprising loss. In the match preceding Federer’s in the Stadium Court, she was taken out by the No. 30 seed Agnieszka Radwanska, 3-6, 6-2, 6-3.
Kokkinakis had to win two matches just to get into the main draw. He has practiced with Federer in Dubai, and he said that experience may have helped him.
“I know that if I bring that level I can beat a lot of good players,” Kokkinakis said.
For Federer, who received a bye in the first round, this was the first time he had lost two matches in a row since 2014. He lost the final at Wellsto Juan Martín del Potro last Sunday, also in a third-set tiebreaker.
“I didn’t play great last week either, I felt, over all,” said Federer, who started the year 17-0 and won the Australian Open. “Nothing new, in my opinion. I’m trying to figure things out. So, I have time now.”
No. 2 Caroline Wozniacki was eliminated on Friday night by Monica Puig. On Saturday, Wozniacki posted a statement on social media saying she and her family had been subjected to verbal abuse from the stands.
“During the match last night people in the crowd threatened my family, wished death threats upon my mom and dad, called me names that I can’t repeat here,” her statement said.
Puig, the gold medal winner at the 2016 Olympics, grew up in Miami and is very popular here.
Wozniacki called Puig a friend and a worthy opponent and did not blame her. But she added that people in the stands swore at the 10-year-old niece and nephew of her fiancé, the former N.B.A. player David Lee, and that security had done nothing about it.
James Blake, the tournament director and a former top player, issued a statement noting that the match was played in front of a “loud and passionate” crowd and condemning bad behavior in general. But the statement did not confirm Wozniacki’s account.
“During the match we had tournament and WTA staff, as well as tournament security courtside,” the statement said. “They never witnessed, nor were they notified of any specific threats made to the players or their families. If we had been notified, the situation would have been handled immediately.”