Rory McIlroy will miss the 2015 Open Championship at St Andrews after suffering an ankle injury in his left foot while playing in a football match with friends

Rory McIlroy has confirmed he will not play the Open after he ruptured his ankle ligaments playing football with friends on Saturday.

The Northern Irishman, who won two majors last year, was due to defend his Open title this month at St Andrews, as well as play at this week’s Scottish Open.

However, McIlroy posted on his Instagram account this afternoon: “After much consideration, I have decided not to play in the Open Championship at St Andrews.

“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 competitive.”

McIlroy finished T9 at the US Open last month and fourth at the Masters in April, both of which were won by American Jordan Spieth.

Watch McIlroy’s analysis of his success

He is still chasing his fifth major win after winning the US Open in 2011, the Open at Hoylake last year and the PGA Championship in 2012 and 2014.

The Open starts on June 16th, ending any hope McIlroy had of breaking Spieth’s domination on the major front this year.

The last time the Open was held at St Andrews in 2010, McIlroy finished T3, shooting rounds of 63, 80, 69 and 68, finishing eight strokes behind Louis Oosthuizen.

It also seems unlikely that McIlroy will compete at the PGA Championship at Whistling Straights in Wisconsin next month.

He currently sits at number one in the Official World Golf Rankings, but could be replaced by Spieth depending on the American’s performance this summer.

McIlroy has won twice on the PGA Tour this season, at the WGC-Cadillac Match Play Championship and at Wells Fargo, and has a total of five top tens in 2015.