(CNN)Rory McIlroy will not defend his British Open title -- and could lose his No. 1 ranking -- after deciding to pull out of next week's major due to the ankle injury he suffered while playing soccer with friends.
Open Championship 2015: Rory McIlroy pulls out due to soccer injury
The golf star had given himself a 10% chance of playing at St. Andrews when he revealed on Monday that he had ruptured ligaments in his left ankle during a kickabout last weekend.
He announced on his social media accounts Wednesday -- while watching tennis star Andy Murray in action at Wimbledon on television -- that he would not be able to line up at the home of golf in Scotland.
"After much consideration, I have decided not to play in the Open Championship at St. Andrews," said McIlroy, who posted a picture of his leg in a protective brace.
"I'm taking a long-term view of this injury and, although rehab is progressing well, I want to come back to tournament play when I feel 100% healthy and 100% competitive.
"Thank you for all your support and best wishes. I hope to be back on the course as soon as I can."
The Northern Irishman could be toppled from the rankings summit if rival Jordan Spieth finishes in the top seven at this week's John Deere Classic PGA Tour event and then adds the British Open to his 2015 Masters and U.S. Open successes.
Spieth, who turns 22 on July 27, would be the youngest player to be No. 1 since Tiger Woods set the record in 1997 at 21 years, 167 days old, the PGA Tour website reported.
McIlroy, now 26, was the second youngest when he reached the top at 22 years and 312 days in March 2012.
McIlroy's European Ryder Cup teammate Ian Poulter wished McIlroy well in his recovery.
"I'm clearly disappointed for him, as I know what it's like to pick up an injury," the Englishman said in a webchat for CNN's Living Golf show.
"I can understand what he'll be going through. I know once he's got his rehab and he's ready to go he'll be fitter and stronger than ever before.