NASHVILLE, Tenn. — “Cowboy” Jack Clement, a producer, engineer, songwriter and beloved figure who helped birth rock ‘n’ roll and push country music into modern times, died Thursday at his home. He was 82.

Dub Cornett, a close friend of Clement’s, said his hospice nurse confirmed Clement passed away surrounded by family after declining treatment for liver cancer.

His death came just months after he learned he would be joining the Country Music Hall of Fame, a fitting tip of the hat to the man whose personal story is entwined with the roots of modern music like few others. He was to be inducted at a ceremony this fall.

“I’ve been walking around for the last hour thanking God for the privilege of knowing Cowboy Jack Clement,” singer Marty Stuart said in an email. “He was one of my dearest friends. To know the Cowboy was to know one of the most original people to ever walk the Earth.”

At the top of his official Country Music Hall of Fame bio was one of Clement’s favorite quotes: “We’re in the fun business. If we’re not having fun, we’re not doing our job.”

Clement could claim as much fun as anyone after a colorful career that left him a famous figure in Nashville, known as much for his colorful personality and storytelling as his formidable place in music history.

A tribute benefit concert to Clement last winter drew video salutes from first lady Michelle Obama, former President Bill Clinton, U2’s Bono and pop star Taylor Swift, as well as performances and appearances by an all-star lineup of fans including Kris Kristofferson, John Prine, Dan Auerbach from The Black Keys and Jakob Dylan.

Clement’s career included stops in Memphis at Sun Records as an engineer for Sam Phillips, where he discovered Jerry Lee Lewis and recorded greats like Carl Perkins and Roy Orbison. He also came through Nashville, where he was a close collaborator of Johnny Cash and many of his fellow hall of fame members, including fellow 2013 inductee Bobby Bare.

As the hall of fame noted, he was a catalyst who always seemed to bring the best out of those he worked with.

For instance, he convinced Lewis to put aside the country material he brought to Sun Records and stretch out with something a little more upbeat. The result? “Whole Lotta Shakin’ Going On.”

And how about this? He convinced Kristofferson to move to town, changing just about everything in Music City.

Kristofferson wrote in an email that Clement was the first person he met when he arrived in Nashville, still wearing his Army uniform.

“He introduced me to Johnny Cash by showing him a letter my mother had written disowning me for resigning my commission to be a songwriter,” he wrote. “To me Jack will always be the embodiment of the Nashville songwriter’s love of the song, regardless of who the writer was.”

Speaking of Cash, it was Clement who came up with the idea of putting Mariachi horns on Cash’s “Ring of Fire,” transforming a fairly sedate love song into an ascendant pop culture moment that would endure time.

“He was the maestro, the ringleader of tomfoolery, and I know Johnny Cash and Sam Phillips are ready to get back to work now that he’s in heaven,” said Cornett, who produced the benefit concert.

Born in Memphis in 1931, Clement picked up music in his late teens and continued to perform after joining the Marines at 17. He invited a young Elvis Presley to sit in his band occasionally after returning to Memphis to attend college, where he picked up the nickname “Cowboy” for his role in a radio show.

He eventually built a garage recording studio with a partner. He took the first records he made to Sun to master and was hired on the spot by Phillips in 1956.

Like with the Lewis sessions, which were conducted when Phillips was away, nimble thinking helped Clement insert himself into another historic moment — the fleeting few hours when Presley, Cash, Lewis and Perkins found themselves together in the store-front Union Avenue studio and decided to mess around a little.

The result was “The Million Dollar Quartet.”

“After a while, Sam went next door to Taylor’s restaurant,” Clement said in a 2010 interview with The Commercial Appeal of Memphis. “And I was sitting in the control room, turning up some knobs and I heard what they were doing. I remember I stood up and said, ‘I’d be remiss if I didn’t record this.’ So I stuck a tape on, walked out in the studio and moved a few mics around, and I just let it run for about an hour and a half or so. Nobody seemed to object.”

He’d run across Elvis and Cash again in Nashville where he served as a producer, engineer and talent scout in Nashville for Chet Atkins during some of country music’s most important years before going out on his own.

Along the way, he boosted George Jones’ career with his composition “She Thinks I Still Care” and had songs recorded by Ray Charles, Waylon Jennings, Tom Jones, Dolly Parton and Porter Wagoner.

As a producer, he helped break through the color barrier in country music through his discovery of minor league baseball player and aspiring singer Charley Pride, established Jennings with their work on “Dreaming My Dreams” and touched the legendary careers of Louis Armstrong, Albert Collins, Townes Van Zandt and Hank Williams Jr., among others.

He also helped mark a turning point in the career of U2, recording the Irish band’s multiplatinum roots tribute “Rattle and Hum.”