Nadal was in his hometown recovering from a knee injury when the region was struck by heavy rainfall which has claimed the lives of at least 10 people.

Rainstorms deluged the town of Sant Llorenc, about 40 miles east of the capital, Palma, on Tuesday evening.

According to Spanish meteorological agency Aemet, more than 8in (20cm) of rainfall in just a few hours hit the island.

Nadal has been out helping local residents clear the water and debris which has ruined businesses and lives.

And Federer, who is competing at the Shanghai Masters this week, took time out of his schedule to offer a helping hand to his arch-rival.

“Hello to all the people in Majorca,” Federer said in a video released after his victory against Roberto Bautista Agut.

“I am very sorry about the news and I know how important Majorca is to Rafa.

“I have been in touch with him and I have seen if I can help with anything.

“I have seen Rafa helping around the villages where he comes from and it is nice to see and very inspiring.

“You have our support. Rafa, we think of everybody in Majorca and we wish you a lot of strength in these difficult times.

“I hope to be back to Majorca soon at some point.

“I just want to send all my best wishes here from Shanghai to all the people in Majorca.”

Nadal has also opened up his tennis academy facilities for victims of the flooding.

“Sad day in Mallorca,” he tweeted.

“My sincere condolences to the relatives of the deceased and injured by the severe floods in San Llorenc.

“As we did yesterday we offer today the facilities of @rnadalacademy for all Those Who Need accommodation.”