BARNSTABLE, Mass. (WHDH) — A Yarmouth K-9 officer has died after police said he was shot and killed while serving a warrant in Marstons Mills on Thursday.

Police identified the fallen officer as 32-year-old Sean Gannon, who had been a member of the Yarmouth Police Department for eight years. He also worked as a police officer at Stonehill College in Easton.

With a heavy heart 💙, our condolences go out tonight to our brothers & sisters of the @yarmouthpolice & to Officer Sean Gannon's family & friends. We are also praying tonight for the recovery of Officer Gannon's K9 partner, who was also injured in today's tragic incident.#LODD pic.twitter.com/9ITeLFi3bq — Mass State Police (@MassStatePolice) April 13, 2018

Police said Gannon was shot at around 2:30 p.m. while serving a probation warrant at a house on Blueberry Lane. Gannon’s K-9 partner, Nero, was also shot and was taken to a veterinary clinic in Dennis to be treated.

Sharon Ellin, who lives across the street, said she saw three police officers serving the arrest warrant at the house. After they entered the house, she said she heard two gunshots.

“It’s scary, very scary. I was walking home with my daughter off the school bus and that’s when all the emergency cars and vehicles were coming down the road,” said Maria Leavitt.

Gannon was rushed to Cape Cod Hospital in Hyannis, where he was later pronounced dead. Police officers from all across the region and from as far away as Bridgewater lined up outside the hospital to offer their respects as Gannon’s body was taken from the hospital to the medical examiner’s. Residents also showed up to pay tribute to the fallen officer.

“I always feel compelled to make sure that my daughter knows that these people serve us, protect us,” said Robert Horne. “And we felt it was the right thing to do to come down and honor this officer tonight.”

“Sean was a wonderful, wonderful young man,” said Yarmouth Police Chief Frank Frederickson. “And I’m not just saying that. We’re going to miss him terribly. Our department’s going to miss him terribly.”

The suspect is 29-year-old Thomas Latanowich, whose last known address is in Somerville. He was arrested at around 6 p.m. and will be arraigned on Friday. Police said Latanowich has more than 100 arrests for violent crimes.

Thomas latanowich has more than 100 arrests for violent crimes..now he's charged with killing a police officer#7news pic.twitter.com/trmAix9HsW — Steve Cooper (@scooperon7) April 13, 2018

Sources told 7News that Latanowich was hiding in a closet in the house’s attic before he shot Gannon in the head as he was clearing the attic. Gannon’s K9, Nero, was also shot and is being treated at a veterinary clinic in Dennis.

Gannon is survived by his wife, Dara.

(Copyright (c) 2020 Sunbeam Television. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)