Rocker Tom Petty relived his 1987 house fire while writing new song All You Can Carry and insists he's grateful nobody close to him was killed in the blaze.

An arsonist set fire to the American Girl singer's Encino, California home, almost destroying the place.

Firefighters were able to salvage the basement recording studio and the original tapes stored there, as well as Petty's Gibson Dove acoustic guitar.

Petty, who later rebuilt the house, recalled the moment he realised he had to flee while he was creating tracks for his new album Hypnotic Eye.

He tells Billboard magazine he had seconds to grab something and left the burning house with a Hohner bass guitar.

Petty says, "I grabbed that and went, 'Hell, is this going to happen to me twice in my life, where everything I own is just wiped out?' And then I thought, 'Well, I'm Ok with that - because things come back, but people don't'."

The 1987 blaze was the second house fire Petty had survived.

Petty's ex-wife Jane put the Encino property on the market last year (13).