Legendary American musician Tom Petty died of an accidental overdose, his family has revealed.

A medical examiner concluded that an accidental overdose had caused the front man of the band Tom Petty and The Heartbreakers, to suffer a fatal heart attack at his Malibu home in October 2017.

Petty's wife and daughter released the conclusion of the post-mortem in a Facebook post, saying the coroner had found the overdose was due to a variety of medications.

The pair said Petty suffered from emphysema, a fractured hip and knee problems that caused him pain but he was still committed to touring.

Tom Petty and The Heartbreakers had just finished a 40th anniversary tour with a final concert at the Hollywood Bowl one week before the 66-year-old's death.

Speaking to Rolling Stone in 2016, Petty hinted that his most recent tour would be his last.

"I'm thinking it may be the last trip around the country," Petty told the magazine.

"We're all on the backside of our 60s.

"I have a granddaughter now I'd like to see as much as I can.

"I don't want to spend my life on the road.

This tour will take me away for four months.

"With a little kid, that's a lot of time."

Tom Petty and The Heartbreakers were inducted to the Rock and Roll Hall of Fame in 2002, having sold more than 80 million albums worldwide, and releasing hits such as Free Fallin' and I Won't Back Down after rising to fame in the 1970s.

As a songwriter, Petty focused often on daily struggles and the will to overcome them, most memorably on "Refugee," ″Even the Losers" and "I Won't Back Down.