A Charleston man who broke into two churches and stole chips and a bagel cut himself both times, and that’s how investigators linked him to the crimes, according to arrest affidavits.

Thomas Lee Duncan, 53, is charged with two counts of second-degree burglary and property-crime enhancement.

Court records list Duncan’s address as Taylor Street, although the affidavits indicate he may have been living at a homeless shelter when he was arrested Thursday.

A window was broken at St. Paul’s Presbyterian Church on S.C. Highway 162 in Hollywood about 6:15 p.m. April 22, 2012, according to an affidavit. Investigators collected blood drops near the broken window. The only item that appeared to be missing from the church was a bagel, according to the report.

A window was broken at Mt. Horr AME Church on S.C. Highway 174 in Adams Run about 9 p.m. June 12, 2012. Again, blood drops were collected near the broken window. A bag of chips was reported missing from the church.

Investigators executed a search warrant for Duncan’s DNA on June 25, 2012, after another burglary in the Adams Run community.

The DNA test came back last week showing that Duncan’s blood matched the blood found at the churches, according to the affidavits.

Duncan was arrested and booked into the Charleston County jail. His bail was set at $125,000.

Reach Dave Munday at 937-5553 or twitter.com/dmunday.