When you're out late at night, realising that you're being followed can be pretty scary.

But one man in Ohio wasn't so much terrified of his stalker as baffled by it, and ended up calling the police at 5:26 am last Saturday.

"Uh, hi, I'm walking from the Elyria train station to my house in North Ridgeville and a random pig just came up and started following me," he told the 911 dispatcher.

The authorities assumed he must be stumbling home drunk out of his wits. But night shift officers arrived on the scene anyway, only to find a completely sober man, in the dead of night, stuck with a very affectionate pig.

"It was staying close to me, rubbing against my legs, and was trying to climb up my legs to get me to pet her," the man, whose name is Ryan Singley, later told the local news station News 5 Cleveland.

One of the officers managed to wrangle the pig into the back of the cop car, and the police took it back to the station and secured it in a dog kennel.

The pig's behaviour made it clear this was not some wild animal they were dealing with. In fact, domestic pigs are clever, highly social animals - so it's possible this one came across Singley and got curious about where he was going.

"If you know about pigs, it's just not that surprising," animal behaviour expert Lori Marino told Live Science.

"There must have been something about this man that this pig was curious about."

Studies have shown that domestic pigs have excellent spatial and working memory, they're highly inquisitive and love to play, and they're even able to understand mirrors.

In addition to smarts, the cleanliness and social nature of pigs makes them popular as pets - and there's no shortage of stories of clever pet pigs helping their owners in trouble.

In 2014, a family in Illinois was saved from a home fire thanks to their pet pig Lucky, who woke everyone up at 5 am by screaming and slamming the bedroom door.

And a Vietnamese pot-bellied pig named LuLu gained international fame back in 1998 when she saved her owner's life by escaping and lying down in traffic to get someone's attention, because the owner was having a heart attack.

Meanwhile, this Ohio night stalker pig - whose name turned out to be Zoey - was safely returned to her owner the next morning; she had dug out of her enclosure. And the North Ridgeville police department ended up with another fun animal story to share.

"You'd have thought we would have learned our lesson after the kangaroo incident," the police wrote in a Facebook post, referring to that time in 2015 they had to accost a roo hopping down the road.

"Also, we will mention the irony of the pig in a police car now so that anyone that thinks they're funny is actually unoriginal and trying too hard."