Roger Federer gave India’s Sumit Nagal a harsh introduction to Grand Slam tennis as the five-time champion weathered an early storm for a 4-6 6-1 6-2 6-4 win on Monday to reach the second round of the U.S. Open.

When the match began it was Federer who surprisingly looked intimidated under the Arthur Ashe Stadium lights as he sprayed errors all around the court but the Swiss great woke from his slumber in time to turn the match resoundingly in his favour.

“I thought I played like my beard today, I was rusty,” Federer, who was sporting a few days worth of stubble, said in his on-court interview.

“I’m going to clean it up for my next match.”

World number 190 Nagal, who has never earned a tour-level victory and only qualified for the year’s final Grand Slam last week, came out swinging and even put a rare look of incredulity on the faces of those inside third seed Federer’s box.

The 22-year-old Indian used impressive court coverage and sent heavily-spinning shots over the net during his dream start but his legs started to look more wobbly as the match wore and Federer righted the ship.

Still, the start to the match for former world number one Federer, who is chasing his first New York title since 2008, could hardly have been worse as he made 19 unforced errors in the first set.

Federer, playing in his first Grand Slam since he failed to convert two championship points on his own serve against Novak Djokovic at Wimbledon, was down 0-40 while serving for the match but won six of the next seven points to hold for the win.

The 38-year-old Swiss only played two hardcourt matches in his leadup to the U.S. Open and admitted that he may have been a little rusty adjusting to the hardcourt but chose to focus on the positives.

“Maybe it’s not a bad thing to go through a match like this. It was very similar at Wimbledon when I dropped the first set there, as well, in the first round,” said Federer.

“At the end you look at the last three sets, and they were good. That’s encouraging.”

After the match Federer heaped praise on his opponent for the performance he managed to deliver on one of the sport’s biggest stages.

“Never easy to come out and play your best. Even though it’s kind of what you live for, you dream about, playing on the big stage. So I think he did that very well,” said Federer.

“He knows what he can bring. That’s why I think he’s going to have a very solid career.”Up next for Federer, who is seeking a record-extending 21st career Grand Slam title, will be Bosnia’s Damir Dzumhur, who beat Frenchman Elliot Benchetrit earlier on Monday.

Federer owns a 2-0 record in career meetings with Dzumhur, having beaten him in the third round at the 2015 French Open and in the first round at Wimbledon the same year.