Pinal County sheriff's deputies said an Arizona City woman called 911 Monday and said she had arrived home to find a stranger in her bedroom, KSAZ-TV, Phoenix, reported Thursday.
The woman told deputies the man fled through her back door and investigators discovered a man matching the suspect's description running through yards while carrying a handgun.
Deputies said the suspect, Angel Meza, 36, dropped the gun's magazine and bullets while fleeing. the report said.
Meza was chased down and arrested. Deputies said he told them the "devil" forced him to go into the home and planted the stolen gun and other items on his person.
Meza admitted to having recently used drugs, deputies said.
Deputies said Meza, who is a convicted felon and therefore banned from possessing a gun, was arrested on charges of residential burglary, trespassing, theft and misconduct involving a weapon.