Janis Joplin was close to completing Pearl on Oct. 1, 1970, when she did an a cappella take on "Mercedes Benz." This impromptu performance of a song questioning whether material things can bring contentment would be the last song Joplin ever recorded.

"Mercedes Benz" was written in August 1970 at Vahsen's, a bar in Port Chester, N.Y. Janis Joplin and her pal Bob Neuwirth, accompanied by actors Geraldine Page and Rip Torn, stopped there for drinks before a performance at the Capitol Theater. Joplin recalled a Michael McClure song she'd heard, but could only remember its first line: "Come on, God, and buy me a Mercedes Benz."

"At the Port Chester bar, Janis sang the line a few times," Neuwirth told the Wall Street Journal. "It was like a sea shanty. Janis came up with words for the first verse. I was in charge of writing them down on bar napkins with a ballpoint pen. She came up with the second verse too, about a color TV. I suggested words here and there, and came up with the third verse — about asking the Lord to buy us a night on the town and another round."

On stage at the Capitol, Joplin stunned her group, the Full Tilt Boogie Band, when she announced that she would sing the new song. "On 'Mercedes Benz,' Janis wanted to accompany herself on guitar," bassist Brad Campbell told the Journal. "She took out her Gibson Sunburst and whispered to us, 'Watch me, boys.' But instead of playing it, she just sang. We eventually played a few notes here and there and sang where we could, figuring she wanted us to follow her."

In Love, Janis, Joplin's sister Laura writes that the singer later phoned McClure. "Janis finally called Michael, saying, 'I'm singing a song with your "Mercedes Benz" line in it.' He said, 'Will you sing it for me?' So, she sang it over the telephone. He said, 'I like my song better.' 'Do you mind if I use it?' she asked. 'No, go ahead,' he said, ignoring any discussions of money or credit." McClure nevertheless was a named co-writer, along with Joplin and Bob Neuwirth.

Listen to Janis Joplin Perform 'Mercedes Benz'

Janis Joplin also performed "Mercedes Benz" at Harvard Stadium in Boston, before she arrived at at Sunset Sound in Los Angeles in September 1970 to begin recording Pearl.

"In those days they’d record on big, fat, two-inch, 16-track tapes," Neuwirth told Yahoo! Music, "but Paul Rothchild, the producer, would always have a little two-track, quarter-inch tape running in case somebody had a great musical idea and improvised something on the spot – so it would be captured and we could go back and reference it. What happened was, the tape machines broke down while she was recording, and there was a delay, and everybody was antsy, saying ‘Come on; hurry up.’ To sort of smooth everything over, Janis just sang that song, [joking] ‘Ah, have you heard my new hit?’ Everybody laughed, and it depressurized the situation. And it was captured on the two-track."

Neuwirth said that quip offered a "marvelous glimpse" into Janis Joplin's unique personality. "Of course, there’s nothing 'rock hit' about it," he said. "It's just the pure power of her charisma that causes it to be notable. The little cackle at the end — it’s so Janis, and that was more indicative of the woman than anything that’s been written about her. I mean, she was a funny girl."

At the same time, there was something darker going on with Joplin, who died of a heroin overdose just three days later. One of the great blues belters of her generation, Joplin explained in Piece of My Heart that "it's the want of something that gives you the blues. ... It's what you wish was that makes unhappiness."

Listen to Janis Joplin Sing 'Mercedes Benz' in Boston

Some sources report that Joplin also recorded "Happy Trails" on Oct. 1 as a birthday greeting for John Lennon. Others cite Sept. 26 as the day the campy cowboy tune was taped. A representative of Sunset Sound told Ultimate Classic Rock that the studio does not have records that confirm the exact recording date of "Happy Trails."

Either way, Pearl was nearing completion by Oct. 3, as the Full Tilt Boogie Band recorded the music for "Buried Alive in the Blues." Joplin listened to the track and was scheduled to record her vocals the next day. When she didn't show up, their road manager drove to the Landmark Motor Hotel, where the 27-year-old Joplin's body was discovered.

Rothchild and the band worked over the next two weeks to complete Pearl, which featured some of Joplin's best work. Neuwirth said that had she not died, "Mercedes Benz" may not have been included. "The album wasn’t finished," Neuwirth told Yahoo! Music. "They didn’t really have enough stuff. And Paul Rothchild thought it captured her personality, so they included it on Pearl. You know, it’s one of those songs that was never meant to see the light of day. It was just a bar improvise on the back of Michael McClure’s thought."

A cover of Kris Kristofferson's "Me and Bobby McGee" from this album became a posthumous No. 1 single for Janis Joplin, while "Cry Baby" almost cracked the Top 40 with the now-far-better-known "Mercedes Benz" as its b-side. "I’m sure Janis would be shocked at the attention that that song has gotten over the years," Neuwirth said with a laugh. "She’d just be shaking her head in disbelief at it."

The Top 100 Rock Albums of the '70s

More From Ultimate Classic Rock