Songwriter Wayne Carson was on the phone with his wife in the early 1970s, apologizing for being away from home so much because of work.

“I said, ‘Well, I know I’ve been gone a lot, but I’ve been thinking about you all the time,’ ” Mr. Carson said in a 1988 interview with the Los Angeles Times. “And it just struck me like someone had hit me with a hammer. I told her real fast I had to hang up because I had to put that into a song.”

The result was the wistful ballad “Always on My Mind,” one of Willie Nelson’s most enduring hits. It was recorded by numerous other performers — as diverse as Elvis Presley and the Pet Shop Boys — and won Grammy awards for song of the year and best country song in 1983.

Mr. Carson, 72, died July 20 at a convalescent hospital in Franklin, Tenn. He was being treated for a number of conditions and died of congestive heart failure, said Shirley Hutchins, administrator of his music publishing company.

Mr. Carson had other hits, most prominently “The Letter,” which was the No. 1 song in the country when performed by the Box Tops in 1967. Three years later, it was back on the charts again in a version by Joe Cocker. It was Cocker’s first U.S. top 10 hit.

Wayne Carson, shown here in 1997, died July 20 at 72. (Nashville Songwriters Association International via AP)

Mr. Carson wasn’t the sole writer of “Always on My Mind.” Mark James and Johnny Christopher shared the credit and royalties, estimated at more than $1 million as of 1988.

But Mr. Carson said the bulk of the song was his. It begins:

Maybe I didn’t love you

Quite as often as I could have

And maybe I didn’t treat you

Quite as good as I should have

“I had the two verses to ‘Always on My Mind’ for a year,” Mr. Carson said in a recorded interview for a book on songwriting. But the song’s producer suggested it needed a bridge, a songwriting element used to break up repetitive verses.

Mr. Carson, sitting at the piano at a recording studio in Memphis, couldn’t come up with one. Fellow songwriters James and Christopher happened by, and he asked for their help.

Together, in a brief session, they came up with a bridge that includes the line, “Tell me that your sweet love hasn’t died.”

Mr. Carson said the bridge was, in his opinion, the least memorable part of the song. But he added, “I will say this: The song probably by all accounts would have never been exactly the same song without that bridge.”

“Always on My Mind” was recorded by Presley in 1972. To the disappointment of Mr. Carson, however, it was released as the “B” side of the single “Separate Ways,” which went on to become the hit, not incidentally because it came at a time when the marriage of Elvis and Priscilla Presley was breaking up.

It was another 10 years before the gentle Nelson version of “Always on My Mind” made it a smash hit.

The 1987 Pet Shop Boys rendition, with a dance beat and heavy use of electronics, was dismissed by many in the country music world. But not by Mr. Carson.

“Everybody had told me, ‘You’re not going to like it. They changed some of the melody, they changed a couple of words and they added all these synthesizers and things,’ ” he said in the Los Angles Times interview.

“But I just kept an open mind and when I finally heard it, I thought, ‘that’s a great record.’”

He was born Wayne Carson Head on May 31, 1943, in Denver. His parents, who were musicians with a stage act called Shorty & Sue, moved the family to Springfield, Mo., when he was a boy.

Influenced by the sound of Merle Travis, Mr. Carson started playing the guitar at 14.

His father, who was a frustrated songwriter, handed Mr. Carson a song in the mid-1960s called “Her Last Letter.” Like most of his father’s songs, it ran to several pages. “He didn’t know when to quit,” Mr. Carson told CNN in 2011. “He didn’t have a song, he had a short story.”

But halfway down the third page, Mr. Carson spotted the phrase, “Ticket for an aer-o-plane,” and he turned that into an entirely new song, “The Letter.”

Gimme a ticket for an aer-o-plane

Ain’t got time to take a fast train

Lonely days are gone, I’m a-goin’ home

My baby, just-a wrote me a letter

The songs that last, Mr. Carson said, whether in country, rock or dance beat form, are those with themes and emotions that strike nearly all people at some point in their lives.

“To me, a good song tells a story that everyone would like to say,” he told the Los Angeles Times. “A song that leads people to say, ‘God, that song’s me.’ ”

Survivors include his wife, Wyndi Harp; a son, Christian Head; and a grandchild.

— Los Angeles Times