He was initially seriously injured, but later died in the hospital.
"With deep sorrow and heavy hearts the Yarmouth Police Department reports the loss of Officer Sean Gannon," the Yarmouth Police Department noted on Facebook Thursday night. "Officer Sean Gannon was killed in the line of duty today."
Gannon, a K-9 handler, was shot on Blueberry Lane in the Marstons Mills village of Barnstable and was taken away in an ambulance, reported WBZ-TV. The suspect was reported to be in custody.
Gannon's K-9 Nero was also shot. He is reportedly in stable condition at a local vet hospital.