One birthday celebration was almost thwarted by a confection-hungry assailant.

A woman in Washington state brought her child's birthday cake into a courthouse to keep her dog from eating it in the car while she came inside to do take care of some business, according to the Associate Press. The chocolate cake passed through a metal detector and was sitting on a table when a stranger grabbed and ate handfuls of the cake.

Several Cowlitz County sheriff's deputies attempted to apprehend the perpetrator by bringing him to the ground, only to find themselves covered in frosting, reports The Daily News of Longview.

50-year-old Robert Fredrickson was arrested for investigation of third-degree theft. The Daily News says the man had been on his way to a court appearance.