A California police department found an unusual –– but effective –– way to catch a giant pig on the run over the weekend. Officers used a bag of Doritos chips to lure the pig, "the size of a mini horse," back into its gate.

On Sunday, the San Bernardino County Sheriff's Department responded to a call of a roaming pig and posted pictures and a video of the encounter on social media.

"Crime fighting to safely securing a mini horse sized pig, we do it all," the Instagram post read.

The footage shows one of the officers walking in front of the hefty swine, flashing a Doritos chip, as the pig follows her. Pictures show the animal was receptive to the trick and to the officers' petting.

Get Breaking News Delivered to Your Inbox

Apparently, it wasn't their first encounter with the mammoth pig. Due to previous calls, responding officers Deputy Ponce and Deputy Berg knew where he lived and took him to his home.

"We were able to put him back and secure the gate," Deputy Ponce said. "It was fun."