The spokeswoman – who declined to give her name until the band made an official announcement – said Barrett died several days ago. She did not disclose the cause of death. Barrett had suffered from diabetes for many years.

Barrett co-founded Pink Floyd in 1965 with Roger Waters, Nick Mason and Rick Wright, and wrote many of the band’s early songs. The group’s jazz-infused rock and drug-laced, multimedia “happenings” made them darlings of the London psychedelic scene. The 1967 album The Piper at the Gates of Dawn – largely written by Barrett, who also played guitar – was a commercial and critical hit.

However, Barrett suffered from mental instability, exacerbated by his use of LSD. His behavior grew increasingly erratic, and he left the group in 1968 – five years before the release of Pink Floyd’s most popular album, Dark Side of the Moon. He was replaced by David Gilmour.

Barrett released two solo albums – The Madcap Laughs and Barrett – but soon withdrew from the music business altogether.

He spent much of the rest of his life living quietly in his hometown of Cambridge, England, and reverting to his real name, Roger Barrett.

He was a familiar figure, often seen cycling or walking to the corner store, but rarely spoke to the fans and journalists who sought him out over the years.

Despite his brief career, Barrett’s fragile, wistful songs influenced many musicians, from David Bowie – who covered the Barrett track “See Emily Play” – to the other members of Pink Floyd, who recorded the album Wish You Were Here as a tribute to their troubled bandmate.

It contained the song “Shine On You Crazy Diamond” – “Remember when you were young, you shone like the sun.” The band also dwelt on themes of mental illness on the albums Dark Side of the Moon and The Wall.

The band spokeswoman said a small, private funeral would be held.