Andy Murray will head home from Shanghai today with one certainty:

that his bid to qualify for the Barclays ATP World Tour Finals in London will go down to the wire.

The Scot's third-round defeat by Spain's David Ferrer in the Shanghai Masters yesterday left him 10th in the race for the eight-man event and immediately prompted him to take a wildcard into an extra event in a push to make it.

So Murray will resurface in Spain a week on Monday when he plays the Valencia 500 Open, an event he won in 2009, before the final qualifying event, the Paris Masters 1000.

With a maximum of 1500 points on offer in those two events, Murray has leeway but victory in Valencia would take some of the pressure off before he gets to Paris, where he has never made it past the quarter-finals.

After a strong start against Ferrer, he was outplayed in the second and third sets and was eventually well beaten, 2-6, 6-1, 6-2.

"He barely missed a ball for about a set and a half," said a disappointed Murray. "I couldn't find a way around him. He played just great tennis, especially the last set and a half.

"At the beginning of the second set I had a couple of opportunities but after that, I've got to give it to him, he played fantastically well and deserved to win."

It was a win that moved Ferrer above Murray in the Race, but providing world No.1 Novak Djokovic takes out Ferrer in the quarter-finals today, there will be fewer than 100 points between Milos Raonic in eighth and Murray in 10th.

With Rafa Nadal, Roger Federer and Stan Wawrinka all due to play in Basle the same week as Valencia, the Spanish city was always the more likely destination for Murray.

And a good showing could be even more crucial because of the fine print in the race standings, which would allow Marin Cilic to leapfrog the eighth-placed finisher if he drops from his current position of sixth to outside the top eight.

Whether it was fatigue in his third straight event or the pressure of chasing points, Murray could not sustain the brilliance he showed in the first set against Ferrer, but said he was happy with his form.

"I've played some pretty good tennis," he said. "Hopefully I can play well the last couple of tournaments, try and make a push for London."

Djokovic and Federer, who together with Nadal have officially qualified for London, both advanced to the quarter-finals in Shanghai.

Top seed Djokovic battled past Mikhail Kukushkin 6-3, 4-6, 6-4 while Federer, who needed to save five match points in the previous round, had an easier day with a 6-4, 6-2 win over Roberto Bautista Agut of Spain.

Australian Open champion Stan Wawrinka is also safe in fourth place and Kei Nishikori has a healthy lead over places six to eight. Tomas Berdych could go above Cilic into sixth if he beats Gilles Simon in the quarter-finals in Shanghai today.