(CNN) In an interview given hours after South Carolina pulled down the Confederate flag from its statehouse grounds in 2015, Rock and Roll Hall of Famer Tom Petty, who died in California on Monday, dug into his regret over using it as part of his show in the mid-1980s.

Petty, a native of Gainesville, Florida, told Rolling Stone in July 2015 that the flag had been "the wallpaper of the South" when he was growing up, and that while he understood its history, "I just honestly didn't give it much thought, though I should have."

The rock icon's decision to address the issue head-on shouldn't have come as a surprise. Petty, especially later on in his career, never shied away from political activism.

Anti-war sentiment was a recurring theme in his songs and he donated to charity the proceeds of his track, "Peace in L.A," which was written and recorded in a fury after the Rodney King riots in 1992. Later on, he would object -- sending a cease-and-desist letter -- to right-wing Republican former Rep. Michele Bachmann after she used his song, "American Girl," to kick off her 2012 presidential bid. Former President George W. Bush also heard from Petty after he played another hit, "I Won't Back Down," on the stump.

As recently as this past summer, after President Donald Trump on July 26 tweeted that he would reinstate a US military ban on transgender people , Petty protested the decision during a concert in New York. As detailed in a Page Six report at the time, Petty performed "an encore finale of the song 'American Girl,' with the screen behind him lit up with a massive photo of the late transgender actress Alexis Arquette, who died of AIDS complications in 2016, and other diverse women."

Thank you #tompetty for your #americangirl tribute that included #alexisarquette and thank you @faderfam for finding it and @rosannaarquette for getting it in there A post shared by David Arquette (@davidarquette) on Jul 27, 2017 at 8:58am PDT

The flag controversy began in 1985, when Tom Petty and the Heartbreakers released a record called "Southern Accents." The first single and most enduring track was "Don't Come Around Here No More," but other songs, like "Rebels," were written as what was initially intended to be a concept album about his Southern roots.

"But the concept part slipped away probably 70% or so into the album," Petty said in the Rolling Stone interview . "I just let it go, but the Confederate flag became part of the marketing for the tour. I wish I had given it more thought. It was a downright stupid thing to do."

The song refers to "a character," as Petty later explained, being born "in Dixie," and includes the refrain, "with one foot in the grave and one foot on the pedal, I was born a rebel."

Over time, though, some fans began to associate Petty with the Confederate emblem. Here's how Petty recalled the moment when he began to push back -- and how his fans responded:

"I used it onstage during that song ('Rebels'), and I regretted it pretty quickly. When we toured two years later, I noticed people in the audience wearing Confederate flag bandanas and things like that. One night, someone threw one onstage. I stopped everything and gave a speech about it. I said, 'Look, this was to illustrate a character. This is not who we are. Having gone through this, I would prefer it if no one would ever bring a Confederate flag to our shows again because this isn't who we are.'

It got a mixed reaction. There were some boos and some cheers. But honestly, it's a little amazing to me because I never saw one again after that speech in that one town."

Other acts, like Lynyrd Syknyrd, have been less willing to denounce the flag. In 2012, guitarist Gary Rossington, in an interview with CNN , expressed some reservations over what it represented.

"Through the years, people like the KKK and skinheads kinda kidnapped the Dixie or Southern flag from its tradition and the heritage of the soldiers," he said. "We didn't want that to go to our fans or show the image like we agreed with any of the race stuff or any of the bad things."

Singer Johnny Van Zant of Lynyrd Skynyrd performs onstage during day 1 of 2014 Stagecoach: California's Country Music Festival at the Empire Polo Club on April 25, 2014 in Indio, California. (Frazer Harrison/Getty Images for Stagecoach/Getty Images)

But the backlash was fierce and Rossington, in a Facebook post , sought to clarify his position.

"I only stated my opinion that the confederate flag, at times, was unfairly being used as a symbol by various hate groups, which is something that we don't support the flag being used for," he wrote. "The Confederate flag means something more to us, Heritage not Hate."

For Petty, though, especially in the aftermath of the Charleston church killings and nationwide uproar over the flag, the question was effectively settled.

"Lowering the flag from the statehouse grounds was the right decision," he said in the Rolling Stone interview. "That flag shouldn't have any part in our government. It shouldn't represent us in any way."

Petty was also critical of the people who still fly the flag and defend it as a cultural signifier.

"When they wave that flag, they aren't stopping to think how it looks to a black person. I blame myself for not doing that," he said. "It's just awful. It's like how a swastika looks to a Jewish person. It just shouldn't be on flagpoles."

JUST WATCHED Tom Petty's most memorable songs Replay More Videos ... MUST WATCH Tom Petty's most memorable songs 01:24

Petty finished his mea culpa with a look ahead -- including more pointed criticism of, as he put it, police "targeting black men and killing them for no reason" and America's use of for-profit prisons.

"That's a bigger issue than the flag," he said. "Years from now, people will look back on today and say, 'You mean we privatized the prisons so there's no profit unless the prison is full?' You'd think someone in kindergarten could figure out how stupid that is."