The man was sleeping under a jumble of cardboard boxes in downtown Glendale, Calif., the police said, when another homeless man approached, lit the cardboard on fire — and then started taking pictures.

The victim, 64, realized the cardboard was ablaze and scrambled, unsuccessfully, to put out the flames with bottled water, according to the Glendale Police Department. He was not injured, and firefighters arrived quickly to put out the fire, which occurred about 1:20 a.m. on Sept. 12.

Surveillance cameras captured the episode, and the police arrested a suspect in a nearby park hours later. The suspect, Richard Smallets, 32, was charged with attempted murder and arson of an inhabited structure or property and is being held with bail set at $1 million, the police said this week. The victim’s name was not released.

The attack occurred the same week that a burned body was found at a homeless encampment in nearby Van Nuys, and after a series of fire-related attacks on homeless people in Los Angeles, The Los Angeles Times reported. On Aug. 25, a fire set by two men who targeted an encampment became a 45-acre brush fire. The next night, a beloved musician was killed when someone set fire to his tent in downtown Los Angeles.