A California gunman held police at bay for six hours Thursday, set fire to several homes, and launched fireworks at surrounding SWAT team members before he charged outside with a shotgun and was shot dead, authorities said.

His name wasn't immediately released but Los Angeles County sheriff's officials described him as a homeless man who made frequent visits to a home where his relatives lived, reports the Associated Press.

Officers were called to a junk-filled property containing several houses over reports that a man had fired gunshots during a family dispute, San Gabriel city spokesman Jonathan Fu said. When officers arrived the man exchanged gunfire with them. Nobody was hurt. The man then barricaded himself in a home, Fu said.

During the ensuing standoff, the man fired gunshots out of a window, threw fireworks out of another window, and set fire to the home, authorities said.

Authorities at the scene described the man as paranoid, believing people were there to hurt him, and negotiators were unable to reason with him.

The man went back into the guesthouse and was shot when he ran out carrying a shotgun.