LONDON - Syd Barrett, the troubled genius who co-founded Pink Floyd but spent his last years in reclusive anonymity, has died, a spokeswoman for the band said Tuesday. He was 60.

The spokeswoman confirmed media reports that he had died. She said Barrett died several days ago, but she did not disclose the cause of death. Barrett had suffered from diabetes for many years.

“The band are naturally very upset and sad to learn of Syd Barrett’s death,” Pink Floyd said in a statement.

“Syd was the guiding light of the early band line-up and leaves a legacy which continues to inspire.”

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 made them darlings of the London psychedelic scene, and 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.