MADRID (Reuters) - Alberto Contador ruled himself out of the road race at next month's Rio Olympics, saying on Tuesday that he needed four weeks to recover from injuries sustained on the Tour de France.

The Spaniard, who withdrew from the Tour during Sunday's ninth stage, told a news conference in Madrid that his goal now was to get ready for the Vuelta (Tour of Spain) which starts on Aug 20.

The men's Olympic road race will be held on Aug. 6, almost four weeks after he sustained his injuries in two crashes in the first two stages of the Tour.

"After what Dr Leyes told me, the Olympics are discarded, because it's not a matter of going there, but to reach them in optimal condition and it looks like it will not be possible," said Contador.

"Now my goal is to recover for the Tour of Spain, which I think is possible. What I need now is to rest and recover."

(This story has been refiled to fix the headline)

(Reporting by Julien Pretot, editing by Alan Baldwin and Neville Dalton)