Authorities in Ohio had to think outside the box -- in this case, a box of cookies -- Friday to lure a missing pot-bellied pig back to its owner.

A pig, named Charlotte, wandered away from its Middletown home and, to get it back, police officers used Oreos to lure it close enough to attach a leash.

MOTOCROSS BIKE FLIES INTO STANDS AT OHIO FAIRGROUNDS LEAVING 7 INJURED, OFFICIALS SAY

The officers were told the crème-filled cookie was its favorite snack, according to FOX11 News.

“We had to take this pig into custody, he was involved in a disturbance...someone was tryin' to blow his house down,” police wrote on their Facebook page.

While pot-bellied pigs aren’t allowed in the city, police didn’t give Charlotte’s owner a citation.

CLICK HERE FOR THE FOX NEWS APP

“They are new to the city, so I did not cite them for pig running at large,” Middletown Officer Dennis Jordan told The Journal-News. It wasn't clear if the pig had escaped from a straw, stick or brick house.