BAKER — Police arrested two people accused of shooting a woman in the leg with a flare gun when she resisted their robbery attempt Thursday, Police Chief Mike Knaps said.

The flare gun’s cartridge had been loaded with nails, Knaps said one of the suspects later told police.

The woman, who was not seriously injured, was walking to her nearby home along a grassy path between the Baker Walmart store’s Plank Road entrance and East Myrtle Street when she was approached from behind by two men about 9:45 a.m., Knaps said.

The two demanded she give them her purse, and when she refused, one of the robbers fired at her with an orange pistol, which police later found discarded off East Myrtle Street.

Two East Baton Rouge Parish sheriff’s deputies, who were a short distance away putting gasoline in a patrol car, were summoned to the scene by witnesses, and Baker officers and deputies with police dogs began searching woods and overgrown fields on the east side of Plank Road in the direction the victim said the robbers had fled.

The man accused of firing the flare pistol later came into the Walmart store, and police took him into custody.

Knaps said the suspect, Jasper Bivens, 17, of Baker, was identified by the victim and witnesses. Bivens told detectives about loading nails into the cartridge and named Patrick Piper, 26, of Plaquemine, as his accomplice, Knaps said.

Baker police arrested Piper about 12:30 p.m. without incident.

Knaps said Bivens and Piper were involved in a Wednesday disturbance at a Plank Road apartment complex. Officers who were dispatched to the disturbance noticed the flare gun at the scene, but it apparently did not figure into the dispute, Knaps said.

“It’s not against the law to own one, but it’s against the law to shoot someone with it,” the police chief said.

Bivens and Piper were booked at Parish Prison on one count each of attempted second-degree murder, attempted armed robbery and illegal use of a weapon.

Piper also was booked with possession of a firearm by a convicted felon. Knaps said Piper is on federal probation for an unrelated offense.