Ian Thorpe watches the Australian Open tennis last year (Picture: Getty)

Swimming legend Ian Thorpe is in hospital in Sydney, fighting an infection that could see him lose the use of his arm.

Reports suggest the 31-year-old contracted the infection at his Switzerland home following shoulder surgery.

Friends of the star told Australia’s Network Seven that he feared losing the use of his left arm.

Thorpe, who won three Olympic gold medals at the 2000 Sydney Games and two more in Athens four years later, moved to Switzerland after he failed in his attempts to qualify for the 2012 London Olympics.

Ian Thorpe with one of his five Olympic gold medals after winning the 200m freestyle title at the 2004 Athens Games (Picture: Getty)

He revealed in his autobiography two years ago that he has a history of depression and substance abuse stretching back many years.

Earlier this year, he was admitted to rehab following a late-night incident in which he reportedly attempted to break into a van.

As well as those five Olympic golds, Thorpe won 11 world titles and 10 Commonwealth Games gold medals, in an outstanding career. He appeared as a BBC pundit during the London Olympics.