Highlights: Federer survives Tiafoe scare to advance
It was Tiafoe who cracked first in a tense finale, but the drama continued as Federer failed to convert a match point when 5-3 up, before going on to be broken back by the world number 70.
However, Federer bounced back to seal victory in the following game at 11:52pm local time, keeping his hopes of a 20th Grand Slam crown alive.
Playing in his 90th match in New York, Federer started slowly under the roof and was broken in the opening game by the NextGen hopeful.
Tiafoe’s big-hitting continued to unsettle Federer, and the teenager maintained his advantage to take the first set after 36 minutes – a feat which no player managed to achieve on the Swiss’ journey to Wimbledon glory in July.
Federer was forced to dig deep in his bid to avoid a first-ever opening round defeat at Flushing Meadows, and he finally broke Tiafoe in the fourth game of the second set.
Fortune started to favour Federer as a net cord brought up three set points at 5-2, and the 36-year-old converted the second to square the match at 1-1.
The veteran began to dominate proceedings on court as Tiafoe’s strokes became wilder and less accurate. An early break fell Federer’s way in the third, and it was one-way traffic for the remainder of the set as he wrapped it up in 28 minutes.
Federer: Tiafoe is going to have a great future
However, the fourth set did not play out as many expected, with two breaks of the Federer serve helping Tiafoe clinch it 6-1 in 23 breath-taking minutes.
The Arthur Ashe Stadium reached fever-pitch as both players stepped out for the final set, and it was Federer who broke first against an opponent who was playing in just the third five-set match of his career.
Federer then found himself serving for the match in the ninth game, but after failing to convert a match point, Tiafoe produced two stunning winners to break back.
But the match lasted just one game later, as Federer broke Tiafoe to seal victory after two hours and 40 minutes on court.
Blaz Kavcic or Mikhail Youzhny await Federer in the second round – the pair were unable to complete their match on Tuesday due to heavy rain.