(Photo Credit: Sheriff's Office | Getty Images)

Charles Barry went to jail hungry, after Florida police arrested him for allegedly impersonating a cop in an effort to buy discounted doughnuts.

The Trinity, Fla., resident, 48, had previously made multiple visits to Dunkin' Donuts, flashed his deceased father's New Jersey police badge and claimed to be a U.S. Marshal in order to receive discounts on doughnuts, police said.

But cops were ready Tuesday afternoon after a suspicious store clerk tipped them off.

"Yesterday, we had an undercover deputy in the store," Pasco County Sheriff's Office spokesman Douglas Tobin said. "He usually comes in at the same time. This time, he didn't show his badge, but we had enough reason to arrest him."

The previous alleged incidents occurred June 6, 7, and 12.

Police said they found a .38-caliber revolver in his pocket during the arrest, as well as ammunition in the vehicle.

Barry was charged with impersonating a law enforcement officer and improper exhibition of a firearm or dangerous weapon. He was released Tuesday on $5,150 bail.

Dunkin' Donuts released a statement, saying, the company was "aware of the incident that occurred in New Port Richey, Fla. The safety and well-being of our guests and crew members is important to Dunkin' Donuts and we are pleased that the suspect has been apprehended."