Rory McIlroy is in a protective boot after rupturing an ankle ligament

World number one and defending champion Rory McIlroy is a doubt for the Open after totally rupturing an ankle ligament playing football with friends.

The 2015 Open begins in nine days' time at St Andrews in Scotland.

McIlroy, 26, wrote on Instagram: "Total rupture of left ATFL (ankle ligament) and associated joint capsule damage in a soccer kickabout with friends.

"Continuing to assess extent of injury and treatment plan day by day. Rehab already started."

BBC golf correspondent Iain Carter "This could not have come at a worse time and the wisdom of having a kickabout is sure to be questioned. Clearly it was a freak accident at a time when McIlroy was relaxing ahead of the most important period of the season. The fact it is his left ankle is also problematic. This is the side he hits towards and that bears his weight through the impact and follow through."

A spokesman for the Northern Irishman, who will have further scans on his ankle over the next 48 hours, said he has not ruled himself out of the Open but a decision on his participation will be taken at the weekend.

The European Tour has announced his withdrawal from the Scottish Open, which starts on Thursday.

Dr Peter Larkins, a former Olympic steeplechaser who now provides insight into Aussie Rules injuries for television, said the recovery time for a ruptured ankle ligament could be up to 12 weeks.

"It's six weeks wearing a moon boot and six weeks of physio," he told BBC Sport.

"Could he play at the Open? It's a tricky one. It depends how much pain he can tolerate. If the ankle is very loose and badly swollen, I can't imagine him walking around for miles for four rounds.

"The swelling can ease in a week with plenty of therapy, but that won't leave much time for practice."

Scottish golfer Richie Ramsay external-link tweeted that he suffered a similar injury, which resulted in a lengthy recovery period.

"I had a full tear of ligaments in my ankle not long ago. It takes a lot longer than you think to heal," he said.

"Three months until I played, and even then getting my foot to work the right way was tough."

Ex-European Tour professional Jamie Spence questioned McIlroy's decision to play football so close to a major, saying it was "definitely a bit risky".

He added to the BBC World Service: "You do it in your off time, you do it in the wintertime, not so close to one of the majors."

Rory McIlroy won last year's Claret Jug at Hoylake to secure the third of his four major titles

Paul McGinley, McIlroy's captain at last year's Ryder Cup, says his absence would be a "blow" for the Open.

"I know St Andrews is a golf course he really loves and a golf course that really suits his game. It's a shame, a shame for the tournament and a shame for Rory if that's the case," he said.

McIlroy, who has won four majors, was set to play in the Scottish Open this week, but will definitely miss that event. He could also miss the chance to defend his US PGA Championship title in mid-August.

McIlroy has had a mixed season so far, finishing fourth at the Masters in April, and joint ninth at last month's US Open. Both tournaments were won by Jordan Spieth. He missed the cut at the Honda Classic in March, but won the World Golf Championships Match Play and the Wells Fargo Championship in May.