MADRID (AP) -- Rafael Nadal will not play at Wimbledon or at the Tokyo Olympics, saying Thursday he has decided to skip the two tournaments after "listening" to his body.

Nadal, who reached the French Open semifinals last week but lost to Novak Djokovic, has won the title at Wimbledon twice, in 2008 and 2010. He also won the Olympic gold medal in singles at the 2008 Beijing Games and in doubles at the 2016 Rio de Janeiro Games.

"The goal is to prolong my career and continue to do what makes me happy, that is to compete at the highest level and keep fighting for those professional and personal goals at the maximum level of competition," Nadal said.

The 35-year-old Spaniard said the fact that there are only two weeks between Roland Garros and Wimbledon "didn't make it easier" on his body to recover from "the always demanding" clay-court season.

"Sport prevention of any kind of excess in my body is a very important factor at this stage of my career in order to try to keep fighting for the highest level of competition and titles," Nadal wrote on Twitter.

Nadal is a 20-time Grand Slam champion with a record 13 titles at the French Open.

His loss at Roland Garros last Friday was only his third in 108 matches at a tournament he won each of the last four years, including by beating Djokovic in the 2020 final.

Nadal sent a "special message" to fans in Britain and Japan in particular.

"The Olympic Games always meant a lot and they were always a priority as a Sports person, I found the spirit that every sports person in the world wants to live," he wrote. "I personally had the chance to live 3 of them and had the honor to be the flag bearer for my country."

Nadal hadn't played much amid the coronavirus pandemic and had a slow start to his season. He won two titles, in Barcelona and in Rome, and had a 23-4 record so far this year.