Roger Federer shakes hands with Dominic Thiem after his third-round loss at the Italian Open.

Story highlights

Federer beaten at Italian Open

Suffers third-round loss to Austrian

Has been struggling with back injury

Still confident of playing at French Open

CNN  — 

Roger Federer is confident he will be fit enough to play at this month’s French Open, despite Thursday’s surprise defeat to Dominic Thiem.

The Swiss tennis star was playing only his second match since pulling out of the Madrid Masters due to the back injury that has troubled him in recent weeks.

He beat Alexander Zverev in straight sets at the Italian Open on Wednesday, but crashed to a 7-6 (7-2) 6-4 loss against 15th-ranked Austrian Thiem in their third-round clash.

“I’m happy I was able to play and still feel about the same. Like yesterday, not worse,” Federer, who had a first-round bye, told reporters in Rome.

“That was most important. The next 10-12 days are really going to be important for me to recover, and then make a plan.”

Federer’s buildup to the year’s second grand slam has been severely hampered by injury, having undergone knee surgery after January’s Australian Open and not returning to action until last month in Monte Carlo.

The 17-time grand slam winner has played at only four events in 2016.

After withdrawing ahead of his first match in Madrid, Federer had considered pulling out of the Rome event – one title that has eluded him over the course of an illustrious career, having lost four finals in the Eternal City.

Despite his lack of hours on court, the 34-year-old was positive about his prospects in Paris, where his sole triumph came in 2009.

Read: How does Maria Sharapova’s chocolate taste?

“I’m confident and hopeful at the same time,” he said. “I have only played five matches in the last four months now, so clearly I don’t want to get too overly excited about what’s ahead, but at the same time I’m a positive thinker and I believe that I’m going to recover.

“Hopefully, the next 10 days are going to be easier and I can practice really well – starting next week.”

The two weeks of action at Roland Garros start on May 22, and Federer added: “I have never had better clay-court preparation, to be honest. I have a lot of hours on the clay already this year. Maybe not on match courts but on practice courts.”

Federer’s defeat means Andy Murray regains the world No. 2 ranking, after the Scot had initially relinquished the position following his Madrid Masters final defeat to Novak Djokovic.

“I actually thought I could really do a good result in Paris,” Federer said. “Now the past couple of weeks it’s been more difficult.

Read: Eugenie Bouchard’s comeback taking shape

“I see my chances as not great to have the most unbelievable run, but if maybe in three, four days I can practice 100% for next week, then I believe that something is possible again.

“Clearly, the way I’m playing right now is never going to be enough for any good run in Paris. I’m still confident I will be fine somehow.”

Thiem, meanwhile, reached just the second Masters-level quarterfinal of his career. The 22-year-old will next play Japanese sixth seed Kei Nishikori as both seek a first semifinal appearance in the Rome tournament.

Will Federer be able to add to his 17 grand slams this year? Have your say on CNN Sport’s Facebook page

Like this story? Get more at cnn.com/tennis

- Source: CNN " data-fave-thumbnails="{"big": { "uri": "https://media.cnn.com/api/v1/images/stellar/prod/160421151138-spc-open-court-feliciano-lopez-barcelona-00030717.jpg?q=x_0,y_0,h_1080,w_1919,c_fill/h_540,w_960" }, "small": { "uri": "https://media.cnn.com/api/v1/images/stellar/prod/160421151138-spc-open-court-feliciano-lopez-barcelona-00030717.jpg?q=x_0,y_0,h_1080,w_1919,c_fill/h_540,w_960" } }" data-vr-video="false" data-show-html="" data-byline-html="
" data-timestamp-html="
Published 12:14 PM EDT, Thu May 12, 2016
" data-check-event-based-preview="" data-is-vertical-video-embed="false" data-network-id="" data-publish-date="2016-04-21T14:13:55Z" data-video-section="sport" data-canonical-url="https://www.cnn.com/videos/sports/2016/04/21/spc-open-court-feliciano-lopez-barcelona.cnn" data-branding-key="tennis" data-video-slug="spc open court feliciano lopez barcelona" data-first-publish-slug="spc open court feliciano lopez barcelona" data-video-tags="davis cup,men's professional tennis,pat cash,professional tennis,sports and recreation,sports events,sports figures,tennis,tennis events,europe,southern europe,spain,barcelona" data-details="">
spc open court feliciano lopez barcelona_00030717.jpg
Is 30 the new 20? Feliciano Lopez gets better with age
03:37 - Source: CNN