Top seed Rafael Nadal left the court at 3.20am after battling past Uruguay's Pablo Cuevas in three sets to reach the semi-finals of the Rio Open.
The pair did not begin their match until 1am local time and Nadal had to recover from dropping the first set, eventually winning 4-6 7-5 6-0.
Nadal will return on Saturday evening to face Italian Fabio Fognini.
"I am going to go off to bed and we'll see if I have recovered," said the 14-time Grand Slam champion.
"I know it is not the fault of the tournament. It is the fault of the ATP wanting to change a match over (to a different court)."
Nadal's long night was the result of a busy schedule that included Fognini beating Argentine Federico Delbonis 6-4 6-7 (10-12) 7-6 (11-9) in three hours and 12 minutes.
|Nadal & Cuevas miss out on record finish|
|The latest ever finish at an ATP tournament came in 2006 when Benjamin Becker defeated Jiri Novak at 3.24am in Tokyo.|
Second seed David Ferrer enjoyed a more comfortable 6-3 4-6 6-2 triumph over Juan Monaco and will next face Andreas Haider-Maurer, who took two hours and 20 minutes to beat home favourite Joao Souza 7-6 (7-4) 1-6 6-4.
In the women's draw, top seed Sara Errani had to overcome a similarly partisan crowd to beat wildcard Beatriz Haddad Maia 3-6 7-6 (7-2) 3-0, with the Brazilian retiring in the final set.
The world number 16 faces Johanna Larsson in the last four after the Swede beat Dinah Pfizenmaier 6-4 6-0.
Irina-Camelia Begu and Anna Schmiedlova will contest the other semi-final after beating Julia Glushko and Veronica Cepede Royg respectively.