Novak Djokovic overcame Gael Monfils in brutal conditions at the Australian Open.

The thermometer headed towards 40C in the shade as Djokovic and Monfils took to a sun-baked Rod Laver Arena for their second-round clash.

Monfils had lost all 14 of their previous professional meetings and, after he won the first set, the heat began to take a serious toll on the Frenchman, who appeared to consider retiring before eventually going down 4-6 6-3 6-1 6-3.

Djokovic, who has had his fair share of struggles in the heat during his career, said: “It was obvious that we both suffered on the court. Really tough conditions, brutal, especially for the first hour and a half. I was just hanging in there trying to use every single opportunity. Obviously he wasn’t at his best at the end of the second and the entire third set.”

The Australian Open has an extreme heat policy but it does not come into effect until the temperature hits 40C, while a decision on whether play continues also depends on the humidity.

It was certainly more than hot enough for Monfils, who began to double over repeatedly early in the second set. After saving a raft of break points to hold for 3-3, Monfils simply walked from side to side during a Djokovic service game.

Djokovic had reportedly asked to play in the day rather than in the cooler evening conditions. Monfils, great athlete that he is, is not renowned for his physical resilience and Djokovic would have backed himself to outlast his former junior rival.

The six-time champion looked like a man who had been sidelined for six months during the first set, making uncharacteristic errors at bad times and finding his remodelled serve given a pounding.

He let Monfils off the hook for most of the second set, too, before finally converting a break point at 4-3. At the end of the set the Frenchman called for the doctor and appeared to express a wish to retire.

But, after leaving the court for a bathroom break, he returned to play the third set. That was over very quickly but Monfils roused himself in the fourth before Djokovic finally clinched victory.

Djokovic goes forward to a third-round meeting with either 21st seed Albert Ramos-Vinolas or American Tim Smyczek.