Defending champion Roger Federer has advanced through to the quarterfinal at the 2018 Shanghai Masters with a three-set victory over Roberto Bautista Agut.

The Spaniard got the jump on Federer in the second set, blitzing him 6-2 before the Swiss maestro kicked back into gear in the third and took the match. But it didn't come without some fire from his World No. 28 opponent.

A successful forehand winner from Bautista Agut at 4-4 in the deciding set was called out by the linesman, forcing the point to be replayed.

Federer successfully broke Bautista Agut's serve and went on to take the set 6-4, sparking an outburst from his downed opponent.


He accused the umpires of favouritism for the 20-time grand slam champ during the "critical" moment as he fought to escape his second round of 16 exit in two tournaments.

"It is not the first time that favouritism has occurred," he said after the match.

"I do not think I lost by that ball, but in my opinion I do not think the referee was right there.

"I'm a bit disgusted with the result because I think I have made merits to win or to put myself in a position to win, it was the first time I had Federer on the ropes, it was a good day to beat him and in the end he was not able to win.

"It was a very tense moment, I went 30-0, with two good serves, I was 30 equal and I felt the tension of having Federer in front of me.

"That the match was at a very critical point, a decisive moment like that, in a deuce, a point more or a point less is decisive."

Federer's win came after paying tribute to long-time rival Rafael Nadal as the Spaniard takes time off from the court to help his country out amid a flash flooding crisis.

"I know how important Majorca is to Rafa and I have been in touch with him to see if I can help with anything," Federer said in a video message.


"I have seen him helping in the village where he comes from and to see that is super-inspiring. Rafa, you have our support.

"We are thinking of all the people in Majorca. We wish you strength in these difficult times and I hope to be back on Majorcasoon."

Fellow rival Novak Djokovic, also taking part in Shanghai, said he hoped Nadal's efforts would inspire others.

"A big hug and friendly regards to Rafa and well done amigo for helping out," said the reigning Wimbledon and US Open champion.

"I invite anyone to give their support in anyway they can. Gracias."

Federer and Djokovic are currently locked in a battle for the World No. 2 spot with the Serbian star just two wins away from pipping the 37-year-old.

He needs to make the final of the Shanghai Masters to go up a ranking.