MIAMI GARDENS-Novak Djokovic has had a rough couple of weeks on the court. The top-seeded Djokovic was upset by Roberto Bautista Agut 1-6, 7-5, 6-3 in the fourth round of the Miami Open Tuesday.

He also made an early exit from Indian Wells earlier in the month. Djokovic was looking to win the 850th match of his career against Bautista Agut, but that achievement will have to take place at another tournament.

“This kind of match I should not have lost,” Djokovic said. “I lost the momentum, I lost the rhythm in the second set. I gave him a little room to step in and he did. A little hope that he can come back, and he made a great comeback. But fault is on me, for sure. I had way too many opportunities that I wasted.”

Djokovic lost to Philipp Kohlschreiber of Germany in the third round at Indian Wells. Djokovic, the president of the ATP Player Council, has been a central figure in recent ATP off-court news. He was involved when the ATP Board of Directors decided this month not to renew the contract of ATP Executive Chairman Chris Kermode when it expires at the end of the year.

Initially on Tuesday, Djokovic denied his recent losses were affected by his off-court activities within the game, but later admitted that it might have taken a toll. “Way too many things off the court,” Djokovic said. “I guess that affected me a little bit on the court. I didn’t feel my best health-wise, as well, in Indian Wells and here. You know, still rusty, but, hey, look, you learn that’s life.”

After racing through the first set against Bautista Agut in 33 minutes, Djokovic lost control of the match. He only took advantage of four of 13 break points presented, and had his own serve broken on three of seven break points he faced. “One, two, three sluggish games, and that’s what happened,” Djokovic added.

Djokovic was leading 6-1, 4-5 when rain delayed play for 30 minutes. Returning to the court, Djokovic surrendered his serve on a second break point in the 12th game to lose the second set. The Serb recouped one service break in the third set, but he lost his serve again in the sixth game to fall behind 2-4. Djokovic holds a 7-3 record over Bautista Agut, but the Spaniard has now beaten him the past two times they’ve played. Bautista Agut defeated Djokovic in a three-set semifinal at the Qatar Open in January.

Earlier in the day, defending champion John Isner advanced to the quarterfinals by securing a 7-6 (5), 7-6 (3) win over No. 19 seed Kyle Edmund. Isner, the seventh seed, has played five tiebreak sets in six sets played in his three-match wins to reach this year’s quarters.

In a women’s quarterfinal match, Australia’s Asheigh Barty defeated Petra Kvitova of the Czech Republic, 7-6 (6), 3-6, 6-2. Earlier Tuesday, two-time Wimbledon champion Kvitova learned that the man who stabbed her in an attack in her home in 2016 was sentenced eight years in prison by a court in the Czech Republic. “Yeah, I heard that, for sure, I heard that this morning,” she said. “I accepted the news. I’m happy for the news and I’m glad it’s over now.”

Roger Federer’s scheduled fourth-round match against 13th-seeded Daniil Medvedev of Russia, scheduled as the second match on the stadium court, was postponed until Wednesday because of a long rain delay.

The match will now take place not before 3:00 p.m. Wednesday. The tournament planned to complete the other three matches scheduled for Tuesday night.