When King of the Hill writers created the character Elroy "Lucky" Kleinschmidt in 2004, they never envisioned that a Rock and Roll Hall of Famer would eventually join the ranks of the many musicians, including ZZ Top and Gene Simmons, who lent their voices to the show.

Lucky was the invention of showrunner John Altschuler, created as a small part of the Season Eight episode “The Redneck on Rainey Street.” The writer described the character as looking like "Tom Petty without the success." So when it came time to find a voice for Lucky, show creator Mike Judge wondered if the rock legend would be up to the task. “And he said, ‘Yeah, I'll do it,’ Judge recalled to the Chicago Tribune, adding that Petty “just killed at the table read.”

As it turned out, the singer was already fond of the animated series. "I loved the show long before I did it," Petty admitted in a 2007 interview with IGN. "And it was a complete coincidence that I got called, because it was really one of my favorite shows."

The rock legend enjoyed his initial King of the Hill experience so much, he offered to reprise the role. “He said, 'Anytime you want me to do it, I'll do it,” Judge noted. “Turns out he really meant it.”

Writers were so impressed by the rocker's acting that they created entire plot points around Lucky. "It was because he (was) good. He came in and he was a really good actor," explained Pamela Adlon, who voiced Bobby Hill on the show. "If (Petty) sucked, then there would be no Lucky."

Petty, who coincidentally wrote a song called "King of the Hill" for Roger McGuinn's 1991 album Back From Rio, would go on to lend his voice to 28 episodes of King of the Hill, with Lucky evolving from a side character to one of the series’ main players. During that time, the redneck -- who earned his nickname after slipping on urine at a Costco and winning a cash settlement -- became romantically involved with the Hill’s niece, Luanne Platter, eventually marrying and starting a family with her.

While the musician relished his King of the Hill tenure, he also admitted to being intimidated by his fellow cast members "because they're real actors." "He's Tom Petty and he comes in and he's intimidated by us!" joked Adlon, noting that the King of the Hill team were in awe of working with a rock icon.

“We had all grown up on his music, that unique voice of his, and to have him as the voice of Lucky on King of the Hill was just wonderful,” Judge later admitted to Rolling Stone. “He was always a pleasure to work with – such a funny guy."

Petty was far from the only music star to grace the animated world of Arlen, Texas. During King of the Hill’s 13-year run on television, Hank, Peggy, Bobby and the gang enjoyed the presence of a wide swath of notable musicians.

Here’s a look at the many rock stars, as well as musicians from other genres, who have appeared on King of the Hill.

More From KLUB Tejano 106.9