Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Texas prankster who partook in the viral trend of licking ice cream in cartons of Blue Bell and placing them back in grocery store freezers has pleaded guilty to a misdemeanor charge.

A video posted to social media in August showed a man running his tongue in a circular motion around the top of a tub of Blue Bell before sticking his finger in it to get a bigger taste, and then licking it again. He then put it back into the freezer at a Port Arthur Walmart.

A man licks ice cream from a Blue Bell carton at a Walmart in Port Arthur, Texas. via Facebook

Anderson on Wednesday pleaded guilty to criminal mischief, according to NBC affiliate WOAI in San Antonio.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Police said D' Adrien Anderson was the man responsible. Port Arthur Police Department Detective Michael Hubert told NBC News that Anderson "advised that he did that as a stunt, that he went back and purchased it."

Police visited the store and verified he did in fact purchase the container, but Walmart had already spent money to replace its inventory of ice cream due to the widely seen video, WOAI reports.

The video he allegedly posted was part of a viral trend in which people filmed themselves licking Blue Bell ice cream and then putting the contaminated containers back on shelves. Blue Bell Creameries is based in Texas and is popular in the South.

Texas Gov. Greg Abbott chided one of the offenders.

Police track down Texas teen who licked Blue Bell ice cream then put it back in Walmart freezer



Glad they caught this despicable criminal



Behavior like this is unacceptable in Texas & is rightfully punished



Don't Mess With Texas... or with Blue Bellhttps://t.co/qLTVIa4uv1 — Greg Abbott (@GregAbbott_TX) July 8, 2019

And law enforcement officers and store employees had fun posting pictures of themselves guarding the beloved Blue Bell.