A defiant Novak Djokovic came through a titanic battle with the unseeded Diego Schwartzman to reach the fourth round of the French Open on Friday.
The defending champion twice came from set down to stay in contention to retain his title, eventually pulling away to win an absorbing contest 5-7 6-3 3-6 6-1 6-1 in three hours and 18 minutes on Court Philippe Chatrier.
Djokovic was given a code violation and two time violations in a tense encounter with the unseeded Argentinian, who rose to the occasion on the big stage but failed to pull off a shock.
The second seed made 55 of 113 unforced errors in a match which swung this way and then the other before Djokovic prevailed to set up a clash with Albert Ramos-Vinolas or Lucas Pouille in the last 16.
Djokovic is now tied in third on the all-time list for most matches won at Roland Garros with 58, but he made hard work of it against a player who had never been this far in a major
It was looking rosy for Djokovic when he broke to love and charged into a 4-1 lead, but the 41-ranked Schwartzman was clenching his fist after breaking back when his opponent sent a backhand long.
Djokovic was not impressed with the chair umpire after he was given a time violation and he paid the price for two woeful attempted drop shots to go a 6-5 down.
The underdog came up with a sumptuous backhand as he served out the set and the second went with serve until Djokovic piled on the pressure to go 5-3 up when Schwartzman netted.
Schwartzman applauded a sublime volley from an advancing Djokovic at full stretch and the Serbian levelled the match with an ace as rain drops fell under dark skies.
Djokovic smashed his racket after an errant forehand before the man from Buenos Aires had strapping applied to his left wrist in a third set which did not feature a break point until a stray forehand from the champion put him 5-3 down.
With newly acquired coach Andre Agassi looking pensive, Schwartzman unleashed a rasping forehand as he fought back from 0-40 down and won the third set when Djokovic was off target with a backhand.
Djokovic came out firing in the fourth, a brutal forehand giving him a 2-0 advantage and he broke again to lead 4-0, prior to being given a code violation after making his feelings be known to the umpire when he lost a first serve for a second time violation.
He switched his focus back to the job in hand and easily served out the set to take it the distance as umbrellas came back up.
Djokovic then took charge of the decider, a weary Schwartzman getting treatment to his side as he felt the strain at 4-1 down after twice failing to hold, and a forehand down the line from the favourite put him through before applauding his opponent off the court.
Djokovic  bt Schwartzman 5-7 6-3 3-6 6-1 6-1
Djokovic - 43/55
Schwartzman - 26/58
Djokovic - 7/1
Schwartzman - 4/5
BREAK POINTS WON
Djokovic - 8/21
Schwartzman - 4/7
FIRST SERVE PERCENTAGE
Djokovic - 70
Schwartzman - 60
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Djokovic - 78/56
Schwartzman - 62/39
Djokovic - 153
Schwartzman - 114