John Daly has withdrawn from the British Open three days after being told he can’t ride in a cart.

The Royal & Ancient Golf Club announced Tuesday that Daly, who won the Open at St. Andrews in 1995, withdrew because of a medical condition. He was replaced for next week’s championship at Royal Portrush by Kevin Streelman.

Daly cited the Americans with Disabilities Act in requesting — and receiving — a cart for the PGA Championship at Bethpage Black in May. Daly said he has osteoarthritis in his right knee and that makes it difficult to walk.

The R&A said it denied his request because it considers walking to be an integral part of the championship.

“We must also ensure, as far as possible, the challenge is the same for all players in the field,” it said.

Daly’s manager said Tuesday he is likely to play the Barbasol Championship in Nicholasville, Ky., and the two-time major champion already has been granted a cart to use in the PGA Tour event.

Daly, who has not played a regular PGA Tour event since The Greenbrier last summer, also is contemplating the Barracuda Championship in Reno, Nev., the following week.

Besides the arthritis in his knee, Daly said he also has been diagnosed as diabetic. Pulling out of the British Open, however, might also be linked to a social media post from Daly on Sunday.

In a Twitter note that he described as “My life chapter 84k,” Daly says he was on vacation in England last week when he was bitten by a spider without realizing it. He was taken to an emergency room on Friday — apparently at Uniontown Hospital in Pennsylvania — and taken straight into surgery to remove a major infection in his abdominal area. He says he also was treated for early sepsis from a brown recluse spider.

His post included hashtags that said he was in some serious pain, glad to be alive and the photos were too graphic.