Murray had never been ahead of Roger Federer in the world rankings before

Andy Murray moved up to number three in the world rankings, overtaking Roger Federer, after winning the Shanghai Masters final against David Ferrer.

Defending champion Murray won 7-5 6-4 to take his fifth title of the year.

Murray said: "I'm still not guaranteed to finish at number three, I'm going to have to win some more matches.

"But if you finish in front of Federer in a year, then there's not many people the last five, six, seven years that have been able to say that."

Fourth-placed Federer has not been outside of the top three since before he landed the first of his 16 Grand Slam titles at Wimbledon in 2003.

Discussing Federer, Murray added: "For a lot of years everything went very right for Federer. He's had a few tournaments this year where maybe things could have gone his way and they didn't but I'm sure next year he'll be competing. He's still playing great tennis."

Murray has now won three tournaments in Asia this month alone. He had a spell as world number two in the summer of 2009 but has never finished a year inside the top three.

The Scot had already won in and Thailand in October and had to be at his best to see off Ferrer.

Ferrer - ranked five in the world - matched Murray in the opening set with a series of thumping ground strokes before a costly double fault in the 11th game handed Murray a break.

Analysis Jonathan Overend BBC tennis correspondent "Murray seemed to be on edge and didn't play his best tennis but it was still more than enough to beat the fifth best player in the world. There were some lovely improvised moments in the second set and, just as Ferrer started firing towards the end, Murray matched him and deservedly won an eighth Masters title from nine finals. Great effort"

The 24-year-old closed out with two aces to bring the 56-minute set to an end.

Murray broke Ferrer in the first game of the second set but then served up two double faults of his own as Ferrer immediately broke back to level at 1-1.

A sublime lob saw Murray break again to take the lead and he then held comfortably to go 3-1 up.

Two more huge aces helped him go 5-3 up before he served out the match to win a tournament for the third weekend in a row.