Nick Kyrgios once more courted controversy before advancing to a third-round tie with Roger Federer at the US Open, while former world number one Novak Djokovic prevailed in four sets.

Umpire Mohamed Lahyani left his chair to warn Kyrgios about his apparent lethargy and he told the Australian "I want to help you" when he was a break and a set down against Pierre-Hugues Herbert on Thursday.

Kyrgios rallied and lost just six games thereafter to secure a victory that earned him a clash with 20-time grand slam champion Federer, who claimed a straight-sets win over Benoit Paire.

Alexander Zverev, Australian Open runner-up Marin Cilic and David Goffin were also among the victors in New York.

KYRGIOS PLAYS THE VILLAIN'S ROLE AGAIN

Tennis' most unpredictable figure was once again the centre of attention on Thursday for a Jekyll and Hyde performance.

Kyrgios – the 30th seed – was booed on Court 17 by an American crowd that felt he had lapsed into one of his disinterested states.

Umpire Lahyani agreed and his decision to leave his chair to speak with Kyrgios was queried by Herbert, who was swiftly dispatched once his opponent got in the zone at Flushing Meadows.

Herbert, however, was scathing of the US Open as he released a statement lambasting the umpiring decision that took place.

FEDERER BEATS FAULTERING PAIRE

At least Swiss maestro Federer can approach his meeting with Kyrgios knowing he has recent experience of tackling an erratic opponent.

Paire smashed his racquet, argued with the umpire and produced 11 double faults as Federer came through 7-5 6-4 6-4.

Federer was far from perfect – the second seed was broken twice and hit just 27 winners – but was never truly troubled in the heat.

DJOKOVIC MAKES LIFE DIFFICULT FOR HIMSELF

There was a 6-1 6-3 6-7 (2-7) 6-2 victory for Wimbledon champion and sixth seed Djokovic, who overcame Tennys Sandgren on Arthur Ashe Stadium.

But it could have been more straightforward had it not been for a lack of composure in the third set.

Djokovic – the 13-time major winner seeking a third US Open crown – looked comfortable in the third, earning a match point as he appeared set to sweep the American in three sets.

However, Djokovic lost his way and allowed Sandgren back into the contest, much to his frustration. The Serbian star, though, dispatched his opponent in the next set.

Richard Gasquet awaits in the third round after the Frenchman beat Laslo Djere.

ZVEREV SURVIVES TEST, CILIC CRUISES

Germany's Zverev had suffered second-round defeats in his past two US Open appearances but the world number four avoided another early exit by downing Nicolas Mahut 6-4 6-4 6-2.

"This was always the Grand Slam that I didn't play my best ever. Not even that I lost, but just game-wise. Game-wise, I never felt comfortable here. Finally I do," said Zverev, who will face Philipp Kohlschreiber. "I feel like I'm playing well. I feel like today, [Mahut] was a tough opponent. He had a few matches here already."

Cilic – the 2014 champion – dashed into the third round with a ruthless 6-2 6-0 6-0 drubbing of Hubert Hurkacz to set up a showdown with in-form Australian youngster Alex de Minaur.

Goffin outlasted Robin Haase, while Julien Benneteau played the final match of his 18-year career after falling to Jan-Lennard Struff.