Thunderstorms are rare in San Francisco, thanks to the Pacific Ocean's cool temperatures. When the weather unexpectedly changed one evening in the '70s, Jerry Garcia was there to see it.

"Jerry lived in Marin, which is to the west," Dennis McNally, Grateful Dead's former publicist and biographer, later told Songfacts. "He had been in the East Bay and he's driving home on the Richmond San Rafael Bridge, and there's a wild storm out to his right on the Northern end of the bay — lightning and just a great, wonderful storm and suddenly he hears a tune in his head, and it's the basic riff of 'Terrapin.' He hears the whole tune in his head."

For Garcia, it was immediately clear that the tune would need room to breathe. "'Terrapin,' even from the inception, was clearly a side, and orchestrated," Garcia told BAM magazine in 1977. Fleshed out, the seven-section song reached 16 minutes in length. "We had a lot of material," Garcia added. "There were two or three tunes that didn't make it onto the album."

This abundance of material could probably be attributed to the fact that the Grateful Dead suddenly had a fair amount of time on their hands — something they were not necessarily used to. They'd played a series of shows in October 1974 at San Francisco's Winterland Ballroom which was filmed and released as The Grateful Dead Movie, and then began a two-year hiatus from touring.

When they resumed in 1976, the Grateful Dead entered a new label contract: Their in-house label, Grateful Dead Records, had finally folded. They'd released three studio albums (1973's Wake of the Flood, 1974's From the Mars Hotel and 1975's Blues for Allah), plus a live double album (1976's Steal Your Face), and the pressure to maintain both a functional touring group and a cohesive business enterprise was too much.

Grateful Dead signed a deal in 1976 with Arista Records' Clive Davis, who had one stipulation: They needed to bring in an outside producer. Except for Stephen Barncard, who co-produced 1970's American Beauty, the band had not worked with an outside producer since 1968's Anthem of the Sun.

Listen to Grateful Dead's 'Terrapin Part 1'

Davis, as Garcia recalled, was not trying to overstep. "He's very delicate. He wouldn't ever insist on handling us in any way," Garcia told BAM. "When we started working with Arista, we did it thinking, 'What the fuck, it'll be nice to be involved with a record company, and not have to be doing the marketing ourselves, not have to do distribution' — just getting that held off. So, fundamentally, we were in the space of, 'Let's just make music, and let's go into it as far as we can.' So the idea of having a producer was tied into that same idea."

One of the producers Davis suggested for the album that would become Terrapin Station was Keith Olsen, who had recently helmed Fleetwood Mac's immensely successful 1975 self-titled album. That seemed to provide clear evidence that Olsen knew how to navigate a complex group dynamic.

"If a producer is working with a solo artist, then he's designing the album from top to bottom; he has control of the musicians who are playing. That's a level of production that you can do really well," Garcia added. "When you're producing a group, you're dealing with the interior dynamics of the group. There's a lot to it. You have to be psychologically involved; you have to be emotionally involved. You have to know what's going on, and you have to be on top of it. Olsen is a real good producer, as far as I'm concerned."

It was still an entirely new situation for Olsen. "Not like any other artist ever," he told Brian Sword in 2014. "I mean, the stories would go on for hours and hours. It was quite a time. They had a nutritionist, in the studio. They had a meeting that said: 'When we are in the studio, sometimes we do too many drugs and we don’t take care of ourselves very well. She can cook and present at least one healthy meal a day — so we won’t get ill and can survive the ordeal.' That will give you a hint of what it was like in the studio."

Olsen's willingness to let the Grateful Dead lead — instead of the other way round – was crucial to their collaboration on Terrapin Station. "What Keith Olsen did, and the only way he could have worked with Grateful Dead was this: he spent some time with us while we were rehearsing," Garcia told BAM. "He didn't call rehearsals; we were rehearsing. He came up, and hung out, and got high with us [then] listened to the music. He carefully notated what was going on, paid attention to what was going on, learned the changes – learned our music.

Listen to Grateful Dead's 'Passenger'

"Then we would go over the tunes, and if there were things that he felt were conflicting or contradictory, he would make suggestions," Garcia added. "His suggestions were usually not along the lines of, 'Why don't you do this?' They were along the lines of, 'What's happening right in there?' Then we would replay the section, and I'd say, 'Right, I don't need to play this,' or [Bob] Weir would say, 'I'll just play this other inversion here.' It was like that. He provided an exterior, uninvolved ear to help hear what the music is supposed to be doing — what the sense of the song was, how it's supposed to work."

Released on July 27, 1977, Terrapin Station opened with a selection of both reimagined songs and entirely original material. Weir's "Estimated Prophet," written in septuple time, led the LP. An eclectic cover of "Dancin' in the Streets" was followed by Phil Lesh's "Passenger," which the bassist wrote with Peter Monk, an actual Buddhist monk who penned the song's lyrics.

"What's weird about that song is I sort of did it as a joke," Lesh later told Dupree’s Diamond News, a well-regarded Grateful Dead fanzine. "It's a take on a Fleetwood Mac tune called ‘Station Man.’ I just sort of sped it up and put some different chord changes in there."

Next was Weir's arrangement of "Samson & Delilah." He learned this traditional song from the Rev. Gary Davis, a blues musician who'd given him a handful of guitar lessons. "I only got three or four sessions with him before he passed from this mortal coil," Weir told Alan Paul in 2001. "He was my main guitar influence, really, and if you listen to his stuff you’ll see that he took it all from piano, too — all of his parts are stride piano playing adapted to guitar. It’s amazing stuff. He had a Bach-ian sense of music, which transcended any common notion of a bluesman."

Closing the first side was Donna Godchaux's first singing and songwriting contribution to the Grateful Dead. "Sunrise" was inspired by early-morning services she had attended under the direction of Rolling Thunder, a Native American medicine man and spiritual leader. "Once I got into the Grateful Dead, Jerry actually encouraged me," Godchaux told Grateful Web in 2008. "He said, 'You need to be writing [songs] to put on a record' – which I did. I was greatly encouraged by his encouragement."

Listen to Grateful Dead's 'Sunrise'

"Terrapin Part 1" would serve as the entirety of Side Two. Longtime Grateful Dead lyricist Robert Hunter saw the same thunderstorm that Garcia had, and it inspired him to put pen to page. He drew from various traditional songs and folk music.

"I was just sitting at [the] typewriter and I put a piece of paper in and typed 'Terrapin Station,'" Hunter told Alan Paul in a separate interview. "Then I thought, 'Okay, what is this about? Oh, appeal to the muse.' And then: 'Let my inspiration flow in token lines suggesting rhythm that will not forsake me until my tale is told and done.' That is an invitation to the muse. ... That’s one of those fairly mythological things that happen once in a while. There it was. Yes, 'Terrapin Station' was magic."

Grateful Dead worked together swiftly in the studio, despite the intricacies involved with "Terrapin Part 1." "We sat down and mapped it out," drummer Bill Kreutzmann wrote in his 2015 book Deal: My Three Decades of Drumming, Dreams, and Drugs with the Grateful Dead. "I said, 'This is how the song goes.' I showed [Mickey Hart] all the parts that I felt worked really well, he added a couple, and that's what the song is today. We went back into the studio the next night and got it right. With the drum parts worked out, everything else snapped together like puzzle pieces."

Olsen took the tracks to England to add particularly lush horn and string orchestra arrangements, making for a more commercial — even prog rock-esque — sounding record that surprised some fans and critics. That hardly mattered to the Grateful Dead: "I think everything is allowed," Garcia told BAM. "We've never spared the audience. We've played much weirder shit than is on this album."

Terrapin Station made it to No. 28 on the Billboard chart, a bit of a drop-off from more recent releases. The album didn't achieve gold-album status until 1987. Still, the dancing terrapin turtles on the cover came to hold a special place in Grateful Dead history as one of their most recognizable symbols. (They were designed by Stanley Mouse and Alton Kelley, artists who'd once lived across the street from the Dead on Ashbury Street in San Francisco. The duo also designed Bertha the Skeleton, the Europe ’72 ice cream kid, and other album covers.)

Garcia continued singing Terrapin Station's praises, too. "I'm happier with this album than with any other album we've done," he told BAM. "This album I can listen to — now that's a first. None of the stuff is alien or remote from us."

Top 25 Psychedelic Rock Albums

Blues, folk, world music – no genre escaped the kaleidoscopic pull of the '60s' trippiest sound.

A Grateful Dead Member Is Part of Rock's Tragic '27 Club'

More From 99.1 The Whale