PERRYVILLE, Mo. -- How much do you love your pet? How far would you go to keep them? For one Perryville family, the answer to that question led to court and a lengthy custody battle against the very agency that brought them together in the first place.

Mack is likely the most wanted dog in Perry County.

Besides being fun-loving, this boxer-mastiff mix has been the center of a two-year legal battle that has rumbled through the courts of mid-Missouri.

It started at Rough Road Rescue.

"We get the worst animals of the worst. Beaten, ran over, shot," said Steve Svehla, head of Rough Road Rescue.

It was where Mack was living before the Pattersons adopted him in early 2015.

"He definitely speaks with us. He's very human like," said Jamie Patterson, Mack's owner.

Patterson, along with her seven children, pet pig and guinea pig adopted Mack in January of 2015. But Patterson says, Mack turned out to be quite the escape artist. She was cited by the city of Perryville several times after Mack was found wandering the streets.

"Every other time we had found him right away and got him back in," said Patterson.

But this final time, they could not find him anywhere. It turns out someone else had-- Steve Svehla.

And he had no plans of returning the freewheeling Mack because he felt the dog wasn't being cared for.

"An animal stays around where they're wanted," said Svehla.

The Pattersons and their seven children were frantic.

"They wondered if Mack felt that we just didn't want him anymore," said Patterson.

Svehla argued Mack's adoption contract required, among other things, a fenced yard for the pooch. The Pattersons had such a yard for a little while, but moved soon after adopting Mack. Without the yard, Rough Road Rescue's contract stated it could repossess Mack.

"Our contract is written to protect the animal. He'll get loose. I know he will. I don't have anything against the family. But they should have a stuffed animal and set it on the couch. There's a lot of chaos going on over there," said Svehla.

"I tried contacting him to try and get Mack home or at least visit him and he wouldn't let us," said Patterson.

That's when the Pattersons' attorney became involved.

"Rough Road Rescue took the position they had a long leash on Mack and at any time they could yank that leash and take him back," said Tim Sansone, attorney with Sandberg Phoenix.

The case went to court, and the judge ruled in favor of the family, saying Mack belongs to the Pattersons.

But Svehla refused to hand the dog over.

So next came a rematch in appeals court. But once again? The court ordered the shelter owner to hand over Mack.

But just as the two sides were preparing to meet and exchange Mack, something almost unbelievable happened-- Svehla arrived with a box of ashes.

"He pulled up and got out and said, 'I'm sorry for your loss' and handed us this box, and just left," said Patterson.

Svehla claims Mack died weeks earlier of an infection.

"My kids believe it. They were crying, they thought Mack was actually dead," said Patterson.

It didn't take long for the news of Mack's death to hit the media and the judge. He wanted an investigation into the canine's passing.

Soon after, Svehla fessed up that Mack was still alive. The judge even sent Svehla to jail for contempt.

And soon, Mack was reunited with the family he'd been away from for nearly two years.

"I almost fainted. It was when he saw the kids that he really lit up," said Patterson.

So how does Svehla explain handing over a box of ashes and defying a court order?

"I handed ashes to the sheriff. I never talked to Jamie. I grabbed a dog that I got cremated and I took it up there and I lied. It's the truth. The truth about a lie. It sounds bad," said Svehla.

Yet despite being jailed for his switcheroo, the shelter owner stands behind his actions.

"What it comes down to was to protect animals. We didn't pick on Ms. Patterson like a vulture. I don't know them. I don't understand why it's so wrong to fight for these animals," said Svehla.

Svehla says he has other good reasons for not wanting Mack to go back to the Patterson. He provided the 5 On Your Side I-Team with a letter from the Patterson family's former landlord, which says the Pattersons neglected Mack and their other dogs. The letter claims the dogs were locked in their apartment without food or water or they were allowed to run loose.

However, Sansone, the Pattersons' attorney, says the allegations are untrue and were not presented in court.

As for Mack, the Patterson family says he's back at home and doing fine.

Svehla has been jailed at least twice in this case. He is facing a felony theft charge for not immediately returning Mack after the case was appealed.