Musicians have been warned to clean their wind instruments regularly after British doctors reported that "bagpipe lung" had killed a man who inhaled fungi growing inside his pipe.

An article in the medical journal Thorax recorded the case of a 61-year-old man who played the bagpipes daily but had struggled with a dry cough and breathlessness for seven years.

His condition improved rapidly when he went on a three-month trip to Australia, leaving his bagpipes at home.

This prompted doctors treating him to take samples from inside the pipes.

These revealed a host of different fungi growing in the moist bag, neck and mouthpiece area of the instrument, which the man had been inhaling when he played.

Despite treatment, the man died in October 2014 and a post-mortem examination showed he had suffered extensive lung damage.

This is thought to be the first reported case of a bagpipe player being exposed to fungi which may have triggered hypersensitivity pneumonitis, the inflammatory lung disease which the man suffered from.

"Wind instrument players need to be aware of the importance of regularly cleaning their instruments and of potential risks," the study said.

"Physicians should be aware of this potential risk factor and promote wind instrument hygiene."

Andrew Bova of the National Piping Centre in the Scottish city of Glasgow told the BBC: "When it comes to cleaning a woodwind instrument, I would say give it a swab after every time you play.

"The moisture can sit in the nooks and crannies and you don't want that."