A man was arrested after being released from a hospital where he was treated for a gunshot wound.

According to police, 100-year-old Pedro Detres of New York City, accidentally shot himself in the leg with an illegal gun.

Detres was holding a .32-caliber revolver in his second floor apartment on 162nd Street in the Bronx, when the gun went off.

Detres, who was born in 1917, suffered a bullet wound to his left thigh as a result of the shooting.

After being shot, Detres was taken to Lincoln Hospital to treat his self-sustained injury. After being treated, Detres was arrested for criminal possession of an illegal weapon.

He was released on his own recognizance.

According to the NYDailyNews, the elderly man's neighbor, 20-year-old Ricardo Rodriguez, said that his grandfather, Carlos Millares, went to Detres’ home to bring him breakfast as his home attendant had time off. When Millares got to the home, Detres informed him that he shot himself.

Rodriguez also said that Detres, who lives alone, has mentioned in the past that he wanted to die.