Officer Mathew Hickey developed a close bond with his police dog, Ajax. When Hickey retired from the force after 30 years of service, he tried to buy the dog from the city for $3,500. However, the dog is considered city property. That means that under Ohio law, Ajax must be sold at auction. A GoFundMe campaign raised almost $50,000 to help buy Ajax.

Officer Matthew Hickey developed a close bond with his police dog, Ajax, and the two were together every day for the past three years. When Hickey retired from the force after 30 years of service, he tried to buy the dog from the city.

“Ajax is a family member; he’s one of my children,” Hickey told CNN affiliate WBNS.

He’s also city property and could probably work for another five or six years. That meant that under Ohio law, Ajax had to be sold at auction. He was valued at $3,500.

A GoFundMe campaign raised almost $50,000 — far more than its goal — to help buy Ajax and the city’s Facebook page was flooded with comments in favor of letting Hickey keep Ajax.

The Police Department and Hickey have managed to work out a resolution: Hickey has been appointed as an auxiliary officer, allowing him to keep Ajax.

“This is the best possible resolution for the city, the Police Department, former officer Hickey and Ajax,” the Marietta Police Department said in a statement.

Hickey says the situation has changed him. “I kind of retired wanting to be a hermit and left alone because I worked the midnight shift since ’96 and I was jaded, but now I am a changed man because of the support,” he told CNN.

Corey Orr, who set up the campaign, told CNN he “expected a few thousand (dollars in donations) but nothing like this.”

Orr said the donations started trickling in locally but now he is getting money from Canada, Australia and even the United Kingdom. Any excess money will go to charities and organizations that work with police dogs.