A man who said he was campaigning for Beto O'Rourke was arrested Tuesday after breaking into a South Austin home and stealing a Popsicle, according to an arrest affidavit.

James Bradford Gibbon II, 28, has been charged with burglary of a residence, a second-degree felony punishable by two to 20 years in prison and a maximum fine of $10,000. He was being held Wednesday at the Travis County Jail on $12,000 bail, online jail records show.

Austin police said they were called about 3:30 p.m. Tuesday to the 800 block of Barton Avenue for a report that a person had broken into a home. When officers arrived, they said they caught Gibbon coming out of the home and took him into custody, the affidavit said.

According to the document, a witness told police that he had been doing yard work and saw Gibbon wearing a Beto T-shirt and lingering at the front door of a neighboring property. He said he asked the man what he was doing, and Gibbon answered he was "campaigning for Beto for president," the affidavit said.

The witness said he saw Gibbon walk toward another house across the street and warned him that the property owner had dogs, the document said.

After police arrived, the woman who owns that property told police that she walked in on Gibbon eating a Popsicle in her kitchen. Her son called 911, the affidavit said.

When officers caught Gibbon coming out of the house, he was wearing the black Beto shirt described by the witness and holding a Popsicle wrapper in his hand, the document said.

Police said that Gibbon admitted in interviews that he did not have permission to be in the home. He said he went through a wallet and briefcase and attempted to hack an iPad that was on the counter while helping himself to a Popsicle in the kitchen, the affidavit said.

Police charged Gibbon with burglary, saying he was attempting to steal property when he was caught and had committed theft by taking a Popsicle from the kitchen, the document said.

A spokesman for O'Rourke said Wednesday that Gibbon is not and has never been employed with the campaign.