Roger Federer lost his cool with umpire Emmanuel Joseph at Roland Garros but recovered to defeat Marin Cilic in four sets and reach the third round of the French Open.

Having cruised through the first set, Federer was a break down in the second when Cilic made it known to Joseph that he was unhappy with the length of time his opponent was spending retrieving his towel between points.

The French official duly gave Federer a warning, prompting a furious response from the 20-time grand slam champion, who, having been absent for most of the last year because of knee problems, is unfamiliar with the change in regulations preventing ball boys and girls from handling players' towels.

Federer allowed his unhappiness to continue and lost the second set but recovered well to secure a 6-2 2-6 7-6 (4) 6-2 victory over his old rival Cilic, making it back-to-back match wins for the first time since last year's Australian Open.

The pair have met twice in grand slam finals, most recently at the Australian Open in 2018, with Federer winning on both occasions, but Cilic's slide down the rankings meant the prize at stake this time was merely a third-round meeting with Dominik Koepfer.

Having come into the tournament with low expectations after two knee operations last year and only three matches in 2021, Federer was excellent in a first-round win over Denis Istomin.

He continued that form in the first set here but Cilic began to apply a lot more pressure and the match hung in the balance in the third set.

Federer should have been two breaks up but missed an open court with a forehand and Cilic pegged him back. The eighth seed played a brilliant tie-break, though, and maintained a high level through the fourth set.

Novak Djokovic has looked impressive so far and he swept into round 3 with a 6-3 6-2 6-4 victory over Uruguay's Pablo Cuevas.

It was not quite as straightforward as the scoreline suggested, with Cuevas throwing everything at the world number one in the third set in particular.

But Djokovic saved eight of the nine break points he faced and set up a last-32 clash against Lithuania's Ricardas Berankis.

Rafael Nadal celebrated his 35th birthday in style with a 17th consecutive victory over old rival Richard Gasquet to progress.

The pair first met as juniors when they were 12 years old and Gasquet was marked out as the man who could make Philippe Chatrier his court.

He won on that occasion but, since turning professional, it has been a very different story, and Nadal's 6-0 7-5 6-2 victory took his record against Gasquet at tour level to 17-0.

Young Swede Mikael Ymer played the role of party pooper on Court Suzanne Lenglen with a 6-0 2-6 6-4 6-3 victory over French favourite Gael Monfils while veteran Philipp Kohlschreiber upset Australian Open semi-finalist Aslan Karatsev.

Italian ninth seed Matteo Berrettini was a 6-3 6-3 6-2 winner over Federico Coria and was joined by two teenage compatriots in 18th seed Jannik Sinner and Lorenzo Musetti, who is having a brilliant French Open debut.

Last year's semi-finalist Diego Schwartzman eased to a 6-4 6-2 6-4 victory over Aljaz Bedene while 18-year-old Spaniard Carlos Alcaraz became the youngest man to reach the third round at a grand slam since his compatriot Rafael Nadal in 2004 by beating 28th seed Nikoloz Basilashvili 6-4 6-2 6-4.