A murdered Filipino politician caught his killer on camera just moments before he was shot dead, and the photograph led to the arrest of the gunman, police said today.

The photograph, taken by district councilor Reynaldo Dagsa and reprinted on the front page of a major newspaper, shows his family posing for the photo while the gunman is in the background aiming a pistol at his victim.

“While he was taking the picture of his family on New Year’s Day, the killer appeared, and he inadvertently took the picture of the killer with the gun aimed at him,” said local police chief Jude Santos.

Dagsa, a councilor in a Manila suburb, was shot moments after the picture was taken and died on the way to the hospital, according to Santos. The family gave the photograph to the police, which led to the arrest of the gunman Monday as well as a suspected accomplice who was also seen lurking in the background of the picture, Santos added.

The suspects possibly had a grudge against the councilor, who was active in law enforcement activities in his district, said the police chief.

Rampant gun violence has long plagued the impoverished Philippines, with a vast array of cheap firearms easily available on the legal and black markets.