Authorities have arrested a homeless man accused of stealing a gun from the Summerville home of a Folly Beach police officer who was trying to help him.

David Ryan Shelton was charged with possession of a stolen handgun and petty larceny after he was arrested last week by Summerville police during a traffic stop, Capt. Tony Phinney of the Dorchester County Sheriff’s Office said.

The gun disappeared around Sept. 7 after the officer had allowed Shelton to stay at her home when he got out of drug rehab. She told deputies she went to clean the gun and discovered that her belt and the .40-caliber pistol had been stolen.

Phinney said they have not yet recovered the gun or ammunition. They did find the officer’s police duty belt in a basket of laundry at Shelton’s mother’s home, according to the incident report.

Shelton was given $5,000 bail on the possession charge and $1,000 on the petty larceny charge, Det. Sgt. Dwayne Peters said.