The 35-year-old was struggling with injury coming into Sunday’s final and was seen wincing throughout the match, regularly touching the left side of his torso.
Nadal came into the final on a 20-match winning streak — his best ever start to a season — that included his record-breaking 21st grand slam victory at the Australian Open.
“Hello everyone, I wanted to announce that I’ve come back to Spain and immediately went to see my medical team so they could run some tests after the Indian Wells final, which I played hurt,” wrote Nadal.
“In the end, it turns out I have a stress fracture on one of my ribs and I will be out between 4 and 6 weeks. This isn’t good news and I didn’t expect this. I’m down and sad about this because of the incredible start to the year I had.
“A very important time of year was coming up with a lot of good feelings and good results. But well, I have always had that fighting spirit and of overcoming things and what I will do is have patience and work hard after my recovery. Once again thank you all for the support,” added Nadal.
Nadal is likely to miss the Monte Carlo Masters next month and the Barcelona Open the following week on April 18.
The Spaniard will be eying a return to the court ahead of the second grand slam of the year, the French Open, which begins in Paris on May 22.
Nadal, who’s a 13-time champion at Roland Garros, will be bidding to win back the title from defending champion Novak Djokovic.