WASHINGTON — When Tandyn Almer was 23, he wrote a catchy pop song that topped out at No. 7 on the Billboard charts. Great things were expected of him as a songwriter, and some thought he might even become a star in his own right.
But in all the decades that followed, there were few triumphs, and certainly nothing like the acclaim he received for composing the words and music of ‘‘Along Comes Mary.’’
In 1966, the bouncy, enigmatic song became the first hit for the Association, one of the popular bands of the era. Mr. Almer was praised as a musical mastermind who brought a fresh sophistication to the sun-dappled pop-rock of the time.
He was interviewed on national television by Leonard Bernstein, the conductor of the New York Philharmonic, and recorded an album of his own music. He became a close friend of Brian Wilson, the troubled creative force of the Beach Boys, with whom he collaborated on a couple of tunes in the 1970s.
And then he disappeared.
People interested in the music of the 1960s wondered what had become of the young composer with so much promise. His half-brother, Nicholas Minetor, recalled reading online speculation about whether Mr. Almer was still alive.
‘‘That just tickled him to death,’’ Minetor said. ‘‘He liked being mysterious. And we knew he was living in a basement.’’
For the past few years, Mr. Almer had occupied an unkempt basement apartment in McLean, where he died Jan. 8. He had atrial fibrillation, congestive heart failure, and chronic obstructive pulmonary disease, according to his sister-in-law, Randi Minetor. He was 70. Acquaintances were surprised that he had lived that long.
For years, Mr. Almer had no health insurance. He had been a chain smoker and made no secret of a bipolar disorder, which often led to dramatic mood swings. His right leg was amputated below the knee in 2011.
Among fans of California sunshine pop, he remains something of a cult favorite, and tributes began to appear after his death. An online disc jockey played his music for an hour. An album of 15 of his songs, recorded by a British group in the 1960s, is scheduled for release in March.
‘‘He’s one of the lost and hidden voices of the ’60s, and he left behind a body of work that’s ripe for rediscovery,’’ said Parke Puterbaugh, a former senior editor of Rolling Stone who wrote the liner notes to ‘‘Along Comes Tandyn,’’ the album coming out on Sundazed Records. ‘‘There’s a whole catalog of incredible songs that he wrote that no one’s ever heard.’’
When Puterbaugh began working on the project about five years ago, he didn’t know whether Mr. Almer was alive. He eventually found an address in Northern Virginia and wrote a letter. A few months later, his telephone rang, and Mr. Almer was on the other end.
Although they never met, they spoke about Mr. Almer’s personal history and his journey in music. Their last conversation took place Dec. 28.
‘‘He was of the caliber — although he wasn’t as prolific or as well known — as Brian Wilson,’’ Puterbaugh said. ‘‘He was very gifted, but he lived a kind of subterranean life.’’
Tandyn Douglas Almer was born July 30, 1942, in Minneapolis. According to his half-brother and sister-in-law, his parents couldn’t settle on a name, so they came up with Tandyn almost as a whimsical afterthought.
By the time he was 4, young Tandyn was playing classical music by ear on piano. When his parents separated, he and his mother moved into an apartment — a basement apartment — with two pianos.
Tandyn played both at the same time.
He attended a conservatory in Minnesota in his youth, but he soon became fascinated with the jazz of John Coltrane, Miles Davis, and Ahmad Jamal. He quit high school at 17 and moved to Chicago to become a jazz pianist. By about 1961, he was in Los Angeles, where his musical interests shifted to the rapidly evolving world of pop and rock music.
‘‘He told me that his head was completely turned around by Bob Dylan,’’ Puterbaugh said. ‘‘Up until then, he had been a jazz freak.’’
According to an account he wrote on Facebook, Mr. Almer practiced at the music department at UCLA and graduated in 1964 from Los Angeles City College. By that time, he was becoming a fixture at the Troubadour, a Los Angeles folk-music club where he occasionally accompanied Linda Ronstadt and other performers on bass.
He also began to experiment with marijuana and LSD, and in some circles, he became renowned for inventing a kind of water pipe, or bong.
By 1965, he had written ‘‘Along Comes Mary,’’ which was picked up by the Association. Something about the tune — its rhythmic complexity, its soaring harmonies, the intricate wordplay of its lyrics — impressed more than just the teenagers who danced to it.
On the the CBS special ‘Inside Pop,’ Bernstein lit Mr. Almer’s cigarette and praised his sophisticated use of the Dorian mode, a musical scale often used in classical music and jazz.
Amateur musicologists tried to unravel the complicated lyrics, with internal rhymes and images of youthful alienation.
‘‘When vague desire is the fire in the eyes of chicks
Whose sickness is the games they play . . . ”
‘‘And when the morning of the warning’s passed, the gassed
And flaccid kids are flung across the stars.”
Was the song about a girl named Mary, the Virgin Mary or, as many thought, the effects of smoking marijuana?
If anyone asked Mr. Almer, he wasn’t coy about the meaning: Yes, of course, it was about marijuana.
Mr. Almer leaves his half-brother, of Rochester, N.Y., and his mother, June Minetor, who is 94 and lives in Minneapolis.
In recent years, Mr. Almer corresponded with acquaintances on Facebook and began to reconnect with old friends. Mostly, though, he stayed in his room, playing music that no one else could hear. He left a body of work of at least 75 songs and possibly as many as 300.
‘‘There are some incredible songs,’’ said Puterbaugh.
‘‘The psychodramas and the traumas [are] gone,’’ Mr. Almer wrote in ‘‘Along Comes Mary.’’
‘‘The songs are left unsung and hung upon the scars.’’