Roger Federer survived a huge scare to battle past Frances Tiafoe in five sets in the US Open first round on Tuesday.
The Swiss great was pushed the distance in the opening round of a grand slam for just the fourth time in his career, but Federer steadied to beat Tiafoe 4-6 6-2 6-1 1-6 6-4.
Federer, who has battled a back injury heading into the year's final major, looked rusty early and never reached his best form in his opener.
In what was a rollercoaster clash in New York, Tiafoe appeared set for a relatively straightforward exit before he came to life again in the fourth set.
But Federer - a five-time champion at Flushing Meadows - maintained his record of never losing in the first round at the US Open, steadying in the fifth set to win in two hours, 37 minutes.
The 19-time grand slam champion was playing his 90th US Open match, but first under the roof on Arthur Ashe Stadium, creating a different atmosphere that includes much more noise.
It appeared to have an impact early as four unforced errors saw Federer broken in the opening game by 19-year-old American Tiafoe.
Fired up, Tiafoe - who lost to Federer in straight sets in Miami - closed out the opening set, marking the first time since 2003 that the Swiss star had dropped a set in the first round at Flushing Meadows.
The match started to turn in the second set as Federer broke serve for 3-1 on his way to levelling the match before claiming another early break in the third.
Tiafoe made numerous errors as Federer took control, only to surrender it as Tiafoe - completely against the flow - raced through the fourth set.
Federer capitalised on his first opportunity in the decider, a backhand winner down the line after a poor Tiafoe drop shot giving him a break and 3-1 lead.
Tiafoe had won just one point against the Federer serve in the fifth set before he suddenly broke thanks to two forehand winners to stay alive in the ninth game.
But Federer got the job done in the next game, Tiafoe sending a tame forehand into the net on match point.
Federer  bt Tiafoe 4-6 6-2 6-1 1-6 6-4
Federer - 41/56
Tiafoe - 23/49
Federer - 17/4
Tiafoe - 5/6
BREAK POINTS WON
Federer - 6/13
Tiafoe - 4/5
FIRST SERVE PERCENTAGE
Federer - 54
Tiafoe - 51
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Federer - 78/55
Tiafoe - 68/52
Federer - 133
Tiafoe - 121