A Palmyra man has been arrested on charges that he attacked a man with the man’s own gun and robbed him, at one point ordering the man to “dig his own grave.”

Matthew Flood, 31, was arrested Wednesday and charged with aggravated assault, robbery, and possession of a firearm by a convicted felon.

The Somerset County Sheriff’s Office, which made the arrest, said in a news release Thursday that the charges stem from an incident Jan. 21 when Deputy Stephen Armiger was approached in his patrol vehicle by a 63-year-old man driving by. The man reported he had been attacked by Flood on Webb Road in Palmyra and was driving himself to the hospital.

The man told police he had been contacted by an acquaintance who asked for a ride so she could leave Flood’s residence. When the man arrived, he was attacked by Flood, who kicked him to the ground and snatched a loaded pistol from the man’s belt.

“Flood then began to pistol whip the victim about the head,” according to the release. “Flood, while holding the man at gunpoint, then ordered the man to empty his pockets and took possession of a small amount of cash, a knife and cellphone that the victim had.”

Police said Flood tried to get the man to go out back behind the residence to “dig his own grave,” but the man convinced Flood to let him leave.

The man sustained severe injuries to his head, chest and ribs, including a nearly severed ear and several broken ribs, police said.

Flood is being held at the Somerset County Jail in East Madison on $50,000 cash bail and scheduled to make an initial court appearance Friday.