Brad Gilbert explains why he feels Roger Federer was right for withdrawing from the French Open if he is not at 100 percent. (2:15)

Gilbert: Federer did the right thing pulling out of French Open (2:15)

PARIS -- Roger Federer pulled out of the French Open on Thursday, ending his record of appearing in 65 consecutive Grand Slam tournaments dating back to 2000.

The 17-time major champion, who had a knee operation this year but returned to play at the Monte Carlo Masters in early April, has been dealing with a back problem that has limited his schedule in recent weeks.

Federer posted on Facebook to say he is "still not 100 percent and feel I might be taking an unnecessary risk by playing in this event before I am really ready."

Last week, Federer played at the Italian Open and lost to Dominic Thiem in the third round. He withdrew from the Madrid Open the previous week because of back pain.

Federer was 20-1 to win the French Open title before withdrawing, according to Westgate Las Vegas.

The last major Federer missed was the 1999 US Open. He was beaten in the French Open quarterfinals last year by eventual champion Stan Wawrinka.

The third-ranked Federer, who has 88 career titles, won the French Open in 2009 -- the only time he has won the tournament at Roland Garros.

Returning from more than two months out following arthroscopic surgery Feb. 3 for torn cartilage in his left knee, Federer looked comfortable as he reached the Monte Carlo Masters quarterfinals, where he lost to Jo-Wilfried Tsonga.

But the back pain has proved to be more of a concern.

Skipping the French Open will give Federer more time to prepare for Wimbledon, a tournament he has won a record-tying seven times.

Because of Federer's withdrawal from the tournament in Paris, nine-time French Open champion Rafael Nadal will move up to No. 4 in the seedings, meaning he will avoid a possible quarterfinal match against top-ranked Novak Djokovic.

After Federer, the next longest streak of playing at major tournaments is 56, held by Feliciano Lopez.

The Associated Press contributed to this report.