MADRID (AP) - Rafael Nadal will sit out Wimbledon and the Tokyo Olympics to rest and recover “after listening to my body,” he announced via social media on Thursday, taking one of the biggest stars of tennis out of two of the sport's biggest events in 2021.

“The goal is to prolong my career and continue to do what makes me happy,” the 35-year-old Spaniard said.

He lost to Novak Djokovic in four grueling sets that lasted more than four hours in the semifinals of the French Open last week - just the third loss for Nadal in 108 career matches at Roland Garros, where he has won a record 13 championships.

That defeat ended Nadal's 35-match winning streak at the clay-court major tournament and his bid for a fifth consecutive title there.

Nadal is tied with Roger Federer for the most Grand Slam titles won by a man with 20; Djokovic went on to win the French Open on Sunday for his 19th major.

Nadal's Slam total includes two trophies at Wimbledon, in 2008 and 2010. He also owns two Olympic gold medals, in singles at the 2008 Beijing Games and in doubles with Marc Lopez at the 2016 Rio de Janeiro Games, where Nadal was Spain's flag bearer at the opening ceremony.

In 2012, Nadal pulled out of the London Olympics and the U.S. Open because of knee tendinitis.

Wimbledon's main draw begins on June 28, and the Olympic tennis competition opens on July 24.

Nadal said having only two weeks between the end of the French Open and the start of Wimbledon this year - normally there are three, but play in Paris was delayed a week because of COVID-19 concerns - “didn't make it easier” for him to recover from “the always demanding” clay-court season.

After the loss to Djokovic at Roland Garros, Nadal pointed to fatigue as an issue for him in the later stages of that match.

On Thursday, he explained in one of a series of tweets that avoiding “any kind of excess” wear and tear on his 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.”

A former No. 1-ranked player who currently is No. 3, Nadal is 23-4 with two titles this season in Barcelona and Rome, both on clay courts.