Roger Federer
Roger Federer beats David Ferrer in three sets at the Cincinnati MastersGetty

Roger Federer rolled back the years with a three-sets victory over David Ferrer in the final of the Cincinnati Masters.

Federer won 6-3, 1-6, 6-2 in what was his 80th career title and the prefect preparation going into this week's US Open, the final grand slam of the season.

The 33-year-old had beaten Milos Raonic in his semi-final after defeating Andy Murray in the quarter-final of the Masters 1000 tournament to set up a clash against Spaniard Ferrer.

The victory meant five-time Cincinnati champion Federer has now beaten Ferrer, who beat Frenchman Julien Benneteau 6-3-6-2 in his semi-final, on all 16 occasions they have gone head-to-head.

The world number six said afterwards that his attention was now focussed on winning his 18th major title.

"I know I didn't beat Rafa [Nadal] and Novak [Djokovic] here but you can only beat who you play. Clearly I can't wait for the US Open but I need some rest too," Federer said after his victory.

The seven-time Wimbledon winner said he had almost pulled out of the tournament altogether after losing to Frenchman Jo-Wilfried Tsonga in the final of the Rogers Cup in Toronto.

"I had to try to back up a tough week from last week, I didn't think it was possible," he said.

"I was considering not playing. But in practice I felt like I was recovering quickly so I gave it a go. I played with less pressure."