NEW YORK — Given the leather jacket and sneer Tom Petty wore on the cover of his 1976 debut, many people assumed he was one of those cheeky punks bent on tearing down the walls of rock ‘n’ roll.

He wasn’t. It’s not that Petty and his band, the Heartbreakers, didn’t have their share of energy and attitude. But the kid from Gainesville, Florida, was a rock classicist to the core, and he built a body of work to stand with his heroes.

That debut contained songs that stood the test of time, the snaky “Breakdown” and “American Girl,” which so echoed the Byrds that it confused that band’s leader. “When did I record that?” Roger McGuinn recalled thinking when he first heard it.

Only a week before his death Tuesday night after suffering cardiac arrest, Petty and the Heartbreakers finished a triumphant 40th anniversary tour in his adopted Southern California home. His sturdy compositions built a discography so strong he couldn’t get to all of his hits. “The Waiting,” “Listen to Her Heart,” “Here Comes My Girl,” “Refugee,” “You Got Lucky,” “Don’t Do Me Like That,” “Even the Losers,” “Don’t Come Around Here No More.” And so on. All are fist-pumping favorites.

It was melodic rock ‘n’ roll built with the solid structures of his favorites from the 1960s. Petty had an impish grin and playful drawl, and in concert he raised his arms to direct both his band and the thousands of fans singing along from the audience.

“‘Rock and roll star’ is probably the purest manifestation of the American dream,” Petty said upon his 2002 induction into the Rock and Roll Hall of Fame. “It’s a blessing beyond belief.”

As Petty and his band performed “Mary Jane’s Last Dance” and “American Girl” to the well-heeled audience, his daughters stood up and danced.

The Heartbreakers stood with Bruce Springsteen’s E Street Band as one of the all-time great rock backup bands. Petty wouldn’t give ground: He added an expletive to his declaration on that night that the Heartbreakers weren’t just one of America’s best bands, they were THE best. Being able to stand onstage next to guitarist Mike Campbell and keyboard player Benmont Tench made Petty the envy of many bandleaders.

Still, two key periods of his career came without the Heartbreakers.

“Full Moon Fever,” Petty’s first solo album in 1989, stands as the apex of his career. Working with producer Jeff Lynne, Petty fashioned a cleaner sound and created the classics “Runnin’ Down a Dream,” “I Won’t Back Down” and, most indelibly, “Free Fallin’.”

He sings about “a good girl, crazy ‘bout Elvis, loves horses and her boyfriend, too.”

And the narrator admits, “I’m a bad boy, ‘cause I don’t even miss her. I’m a bad boy for breakin’ her heart.” He had his own problems.

Petty was also a member of the temporary supergroup, the Traveling Wilburys, with George Harrison, Roy Orbison, Bob Dylan and Lynne. Pulled together by Harrison to record a B-side to a single, “Handle With Care,” they soon realized that the song, and their sound, was too good to bury. It felt like a night at a Hollywood party, a bunch of rock legends break out the guitars, pour a few drinks, and maybe a few more, and trade lines with each other.

It’s a good life.

“It was a gift I was given and what it means I don’t know,” Petty said in a 2009 interview with The Associated Press. “Johnny Cash once told me, he said, ‘it was a noble job.’ And I said, ‘Really?’ And he said, ‘Well, it makes a lot of people happy.’ … It does. It makes a lot of people happy. You can lose sight of that. People come up to me on the street and tell me how some song played a role in their life or how it got them through a hard time or this and that and I just think, ‘Damn, that’s what it is about.’”

Like everyone’s, Petty’s path wasn’t always smooth. Biographer Warren Zanes’ book revealed that Petty slipped into heroin addiction in the 1990s. He recently told Rolling Stone that his use of a Confederate flag as a prop while promoting a 1980s album, “Southern Accents,” was a stupid move he regretted. He was frustrated when the passage of time took him out of the spotlight when he actually deserved it: the 2014 album “Hypnotic Eye” was excellent, but the pop world had moved on.

Last December, as he was about to embark on the anniversary tour, Petty told Rolling Stone that it would likely be his last big jaunt with the Heartbreakers. He had a granddaughter he wanted to spend time with.

It was easy to dismiss it then. Heck, they were too good and not that old, not really. His old buddy Dylan is 76 and constantly on the road.

Sadly, it turned out to be true.

DISCOGRAPHY

With the Heartbreakers

“Damn the Torpedoes,” 1979

“Hard Promises,” 1981

“Long After Dark,” 1982

“Southern Accents,” 1985

“Let Me Up (I’ve Had Enough),” 1987

“Into the Great Wide Open,” 1991

“Echo,” 1999

“The Last DJ,” 2002

“Mojo,” 2010

“Hypnotic Eye,” 2014

Solo

“Full Moon Fever,” 1989

“Wildflowers,” 1994

“Highway Companion,” 2006