OAKLAND, Maine — The pig that terrorized a teenager walking the trails behind Messalonskee High School and more recently, frightened a local woman out for a walk in that area, has been caught, an Oakland Police official confirmed Tuesday.

The pig has been returned to his owner, who didn’t even have it for 15 minutes before it ran away in June, Capt. Rick Stubbert of the Oakland Police Department said Tuesday afternoon.

Stubbert said credit for the capture belongs to Patrick Faucher, the town’s animal control officer, and Ross Gatcomb, a U.S. Department of Agriculture wildlife specialist, who baited the pig with corn and ice cream.

The goodies were used to lure the pig into a specially built pen, where it was found Tuesday morning, Stubbert said.

The pig was then transferred to a crate — also specially built — loaded onto an ATV trailer and taken back to its home.

Oakland Police Chief Michael Tracy said earlier this month that police have reports of “three or four encounters” with the 80-pound male pig on the trail system.

That prompted police to temporarily close the trails due to safety concerns.

“The trails are safe. They have reopened,” Stubbert said.