A police officer had to use a taser to apprehend an alleged shoplifter who later said he was trying to pull a knife from his pocket so police would shoot him.

Ryan Matthew Parsons, 30, was arrested Sunday afternoon near the west-side Walmart on charges of interference, trespass after warning, and shoplifting in an amount over $20.

Two police officers went to the Walmart off CY Avenue after Parsons, referred to in court documents as a "known shoplifting suspect," left the store on foot.

Parsons saw an officer approach and took off, running toward the rear of Walmart. The two Casper Police officers went after Parsons.

Meanwhile, an Evansville officer radioed the officers and said Parsons was known to carry knives.

Parsons reportedly reached into his pockets several times as he fled, and a Casper officer used his taser to gain control of Parsons before he could jump the fence to Interstate 25.

A search of Parsons turned up a set of headphones, an audio cable, a USB charging cable, black carry bag and associated paperwork. Police also found an opened bag of peanut butter cups in Parsons' jacket pocket, and discovered he was wearing three pairs of jogging shorts.

Parsons also had an orange Gerber knife in one pocket.

Walmart staff knew Parsons to be a shoplifter. He was banned from the store for life in 2010. An employee watched Parsons as he allegedly stole items from the store.

Parsons reportedly admitted to stealing from Walmart because he needed money for his niece's birthday present. He was not very coherent, police say, and told officers they were not going to take him to jail.

As police drove Parsons to jail, he reportedly said he was trying to get one officer to shoot him by taking his knife out of his shorts. Parsons said he was unable to reach the knife.