The 9-year-old German shepherd, who specialized in detecting explosives and tracking people, was forced to retire early after several cancerous masses were found on his spleen and liver, said UW-Madison Police Department spokesman Marc Lovicott. He was scheduled to retire in January.

A few weeks ago, his handler, Lt. Brent Plisch, took Odin to a veterinarian after he noticed that the dog was fatigued, reluctant to eat and was acting unusual. Lovicott said euthanizing Odin was chosen over surgery because he was in pain, and treatment likely wouldn’t be effective.

“I … made the decision to let him go in the most dignified way possible, giving him the chance to be as honorable in his death as he (was) in life,” Plisch said.

Odin was showered with pets and treats on Friday, his last day as a K9 officer, Lovicott said.

He said Odin was a friendly dog that was loved by many people.

Odin had an uncanny ability to find treats, Lovicott said. When the department moved offices, he said Odin easily found who kept treats in their offices.

When not hunting for treats, he was sniffing out explosives or tracking humans. Lovicott said Odin was one of the few dogs in the nation to have found a live explosive device while working.

In that incident, Odin was called to the scene of a 2016 microwave explosion in Fitchburg near the Nevin Springs Wildlife area.

Fireworks were found on the scene and there was no other damage or injuries, with no indications of an ongoing threat to public safety.

As a police dog, Odin worked with the FBI, U.S Secret Service and Bureau of Alcohol, Tobacco, Firearms and Explosives, among others, he said. Odin also protected presidents, governors, the Dalai Lama and thousands of spectators at UW-Madison athletic events in his career.

Odin started with the department in 2010, Lovicott said.

Odin’s death follows the recent retirement of the department’s drug-sniffing dog. A new drug-sniffing K9 should start with the department soon, Lovicott said.

Odin’s replacement, K9 Maya, had already started, he said.

In a processional Tuesday, dozens of police cars, motorcycles and firetrucks led Odin from Plisch’s home in McFarland to Memorial Pet Services in Middleton, Lovicott said.