The 19-year-old Alcalaz won the match 6-4 3-6 6-4 4-6 6-3, which ended at 2:23 am local time. Just three minutes behind the tournament’s latest finish.
Alcalaz, the highest-ranked player left in the men’s draw, will be in his second U.S. Open quarterfinals when he faces Yannick Sinner on Wednesday.
“It was unbelievable,” Alcalaz said in an on-court interview.
“It was tough coming back in the fifth set and staying mentally strong, but the energy I received today (from the crowd) helped me win.”
In a nearly four-hour match against Cilic, Alcalaz led in the first and third sets but failed to pull away from their Croatian opponents until the fifth set.
He suffered a service breakdown at the start of the match, but fought back to win the next four games and take the first set.
The second set had a similar story. After an early break from Alcaraz, Cilic came back four games in a row and held serve to level the match.
Alcaraz served until he broke at 5-4 in the third set, but his 2-1 lead was cut when Cilic broke late in the fourth set.
The match continued well past midnight, when Alcaraz took advantage with a 2-1 love break before Cilic sealed the win with a forehand to the top of the net.
This was the toughest test of the tournament to date for Alcaraz, who had not dropped a set before facing Cilic.
He next faces another rising star, 21-year-old Sinner. The Italian, like Alcaraz, hopes to reach a Grand Slam semi-final for the first time.