When the 117th best player in the world, Denis Istomin – here courtesy of a wildcard – put his 15th ace past the six-times champion, Novak Djokovic, in the fourth-set tie-break to take their second-round struggle into a deciding frame, disbelief dressed the Serb’s reddened face.

He could hardly believe a player he had beaten five times for the loss of only one set and 36 games was a handful of well-struck winners away from putting him out of the Australian Open, a tournament he all but owns. Now he had taken him for two sets and 28 games; it was his stage and his time to dream the impossible.

Istomin’s best win last year was reaching the third round of Wimbledon and his recent form has been ordinary but he plainly rose to the occasion to win 7-6 (10-8), 5-7, 2-6, 7-6 (7-5), 6-4 against an opponent who, until Andy Murray deposed him in November, had been the world No1 for 122 weeks in a row.

This was sporting drama Tennis Australia could not have dialled up in a movie, although they did not want their defending champion leaving the tournament in the first week. It had been seven years since he had lost a set in the first week in Melbourne. Now he had to repair some serious damage just to get into the third round.

Last year, Djokovic survived a similar horror show against Gilles Simon in the fourth round. He contrived to hit 100 unforced errors in five sets, finding time to joke with the crowd about his addiction to drop shots the Frenchman kept gobbling up like croissants.

Apart from Djokovic’s suggestion that they go “straight to the tie-break” after a 16-minute opening game, there was little levity here on Thursday. Djokovic is enduring a minor crisis and it worsened when Istomin, chancing his arm at every occasion, hit an astounding winner to break for 3-2 in the fifth.

Simon worked Djokovic over with Arthur Ashe slow-balling; Istomin just belted the cover off the thing, and often there was little the world No2 could do about it. He seemed paralysed by anxiety and self-doubt, a rare sight; when he has been in trouble in the past, he invariably has found a way but the crowd were firmly with the Uzbek with the funny wrap-around glasses and the not-so-funny around-the-post winners.

Djokovic double-faulted for the ninth time but held for 3-4. They had been playing for four hours and 37 minutes, which used to be routine for Djokovic at the height of the attritional tennis that threatened to strangle the life out of the game a few years ago. For all that, this battle had everyone in the Rod Laver Arena craning forward all the way to the end. Istomin chomped on a sandwich before returning to the service line with ball in hand for the eighth game, just a few healthy blows and kind line calls from victory. A couple of the latter and a 17th ace helped him to 5-3. Djokovic had to hold to stay in the tournament.

The tension rippled through the arena. The muscles rippled along Djokovic’s long, lean serving arm. Istomin hit a winner: 0-15. Djokovic levelled. Istomin hit long: 30-15. Istomin hit an unforced forehand error: 40-15. Another Istomin mistake on the forehand and Djokovic is safe – for the moment.

Djokovic closes his eyes in deep contemplation during the break. Istomin steps up to serve for the match. Would he get the prize his endeavours deserved? Djokovic slaps a weary forehand into the net: 15-0. Then another: 30-0. Djokovic scrambles back a point: 30-15. Another Djokovic forehand goes astray: 40-15. A hush wraps itself around the gathering …Djokovic’s final backhand lets him down, and Istomin celebrates the finest achievement of his career, by raising his arms aloft, drinking in the extended cheers of the disbelieving crowd.

It was a peculiar performance by Djokovic, one that Boris Becker found out of character with the competitive nature of the player he guided to six grand slams before they split in December. “When you’re with somebody so close for so many years and so many titles you’re emotionally very attached and I felt for him,” he said on Eurosport.

“I absolutely never expected him to have trouble with Denis Istomin. No disrespect but Novak is a six-times Australian Open champion but I could tell in the first set he was way too defensive and way too passive. The first set in a [best of] five match is always very important. In the fourth set again he was a bit lethargic and not playing at full power.

“Then once you’re in the fifth set anything can happen and credit to Denis he kept his composure, he kept his nerve, he went a break up and kept serving well and hitting the lines so it’s well deserved.”