TORONTO (Reuters) - Former champions Roger Federer and Rafa Nadal have pulled out of the Rogers Cup in Toronto, leaving the tournament without three of the world's top four players, Tennis Canada said on Tuesday.

The decision by Swiss world number three Federer and Spanish world number four Nadal comes a day after Wimbledon winner Andy Murray, ranked second, said he would not defend his Rogers Cup title so he can rest before defending his Olympic singles crown in Rio.

Federer, a 17-times grand slam champion who won the Canadian stop in 2004 and 2006, said he needed more time off after his bid for a record-extending 18th grand slam title ended in the Wimbledon semi-finals earlier this month.

"Looking ahead, it is best for me that I take more time after Wimbledon," the 34-year-old Federer, who will seek his third Olympic medal at next month's Rio Games, said in a statement. "I look forward to coming back to Canada next year."

Nadal, who has been out of action since pulling out of the French Open following his second-round match with a wrist injury, said he was not fit enough to return to competition.

The 30-year-old Spaniard, a three-times winner of the Rogers Cup tournament that alternates each year between Toronto and Montreal, was only recently given clearance to compete in Rio despite not fulfilling the qualification criteria.

"I only started practicing a week ago after my wrist injury and I am not ready to play such an important event," said Nadal.

The Rogers Cup, where world number one Novak Djokovic is top seed, will run from July 23-31 and the tennis competition at the Rio Olympics will be held Aug. 6-14.

(Reporting by Frank Pingue; Editing by Larry Fine)