Matthew Hickey and Ajax

Retiring Marietta police officer Matthew Hickey and police dog Ajax.

MARIETTA, Ohio -- The small Southern Ohio community of Marietta is making headlines after city officials said they will auction off a police dog rather than sell the K-9 to his handler.

Marietta police officer Matthew Hickey is leaving the force after 30 years and offered to buy his partner, a dog named Ajax, local media outlets reported. But the city's law director, Paul Bertram, told the Marietta Times that state law requires the city put the dog on the auction block.

Hickey told NBC's Columbus affiliate that he considers Ajax a member of his family.

"I had the money for the dog and was ready to hand it to the chief of police, but the chief of police said he couldn't take it," Hickey said.

He's developed a deep bond with Ajax during their time working together and wanted the two of them to retire together, he said.

Hickey said he wanted to stay on the police force but had to retire for medical reasons.

By law, Marietta must auction off unused property of a certain value, Bertram said.

Ajax, who is considered city property and is valued at more than $3,000, meets that threshold.

When an officer retires, he forfeits the right to buy the dog under state law, Bertram told reporters.

The city's police department doesn't currently have enough staff to train another K-9 officer, according to the Marietta Times.

Anyone who bids on Ajax must have the training to handle a police dog, the Times reported.

Hickey has received an outpouring of support from the online community since he announced his retirement earlier this week.

A GoFundMe account set up to help him buy Ajax has raised nearly $23,000 as of 4 p.m. Saturday.

The fund's goal was $3,500.

Marietta's Facebook page has been inundated with angry comments about the auction since the news went viral.

The city eventually published a post with its official email address and asked everyone to send Marietta officials comments that way.