A man was killed when a rifle accidentally discharged while he was target shooting in Yavapai County, officials said Tuesday.

Angel Perez, 25, was target shooting near Paulden with 25-year-old Jose Cruz when the shooting occurred, around 3 p.m., Sunday, the Yavapai County Sheriff's Office said.

Cruz told deputies that he and Perez were target shooting with AR-15 rifles, the Sheriff's Office said.

Cruz said during the shoot, he had taken taken the magazine out of his AR-15 and placed it on a table, then continued shooting with other firearms, officials said.

When they were finished, Cruz told deputies, he placed the AR-15, which he believed was unloaded, and placed it on the tail gate of their truck, intending to place it in a case, the Sheriff's Office said. He grabbed the rifle by the empty magazine well, and the rifle discharged, firing a round into Perez's midsection as he walked by, official said.

Perez was declared dead on the scene, the Sheriff's Office said.

Cruz was interviewed “extensively,” but was not arrested, according to a statement from the Yavapai County Sheriff's Office. Deputies determined there were no initial signs of foul play, but the investigation is ongoing, officials said.

When complete, the case will be submitted to the Yavapai County Attorney for review, the Sheriff's Office said.