YARMOUTH, MA (WSVN) – Thousands of police officers from hundreds of departments across North America marched to a church in Yarmouth Wednesday to attend the funeral for a 32-year-old K-9 officer killed in the line of duty.

A sea of uniformed and white-gloved officers from as far away Canada, Chicago and New York City marched from the town’s high school to St. Pius X Roman Catholic church and stood outside during the Mass for Yarmouth police Sgt. Sean Gannon. Joining them was a large crowd of residents, some carrying American flags.

“Sean was a wonderful asset to our community and it is the right thing to be here,” said Rebecca Hamlan. “So, hopefully, all of us being here today brings his family some comfort in the difficult coming weeks ahead.”

About 5,000 police officers were at the funeral, according to the Massachusetts State Police. The funeral was attended by Gov. Charlie Baker and Lt. Gov. Karyn Polito, among many other notables.

Since Gannon was a K-9 officer, 400 K-9 officers and their dogs were there as well. Gannon’s dog, Nero, was also shot when he was but underwent emergency surgery and is now recovering.

“We have a fallen brother but we have a fallen animal that has to recover that everyone has to remember too,” said Det. Justin McCann, who came to the funeral with his police department from New Jersey.

The Mass was followed by a private burial for family and colleagues. Police cruisers later lined up and led a final procession in Gannon’s honor as the hearse made its way to the cemetery.

Gannon was promoted posthumously to sergeant before his funeral. He was shot and killed last Thursday while he and other officers were serving a probation warrant at a home in Barnstable’s Marstons Mills section.

Gannon, an eight-year veteran of the department, is survived by his wife, parents and a brother and sister.

Yarmouth police announced Gannon’s promotion in a statement:

Yarmouth Police Department Sergeant Sean McNamee Gannon, age 32, died on impact in the line of duty from a gunshot wound to the head on April 12, 2018.

Born August 22nd, 1985 in New Bedford, Massachusetts, Sergeant Gannon graduated from All Saints Elementary School in 1999, and Bishop Stang High School in North Dartmouth in 2003.

Sergeant Gannon graduated with honors from Westfield State University in 2007 with a Bachelor of Science in Criminal Justice, a Master’s with honors from Massachusetts Maritime Academy with a degree in Emergency Management in 2011, and the Massachusetts Bay Transit Authority Municipal Police Academy.

Sergeant Gannon’s internships included service with the Nantucket Police Department, and the Westfield Police Department, and earned certifications as an Emergency Medical Technician and Life Saving Instructor.

Sergeant Gannon started his Law Enforcement career at Stonehill College in 2007 as a member of the Campus Police Force before joining the Yarmouth Police Department in 2010.

Sergeant Gannon was part of the Emergency Management Unit, a part-time member of the Proactive Anti-Crime Team, and he was the first full-time K9 narcotics officer for YPD with his devoted K9 Thor.

After retiring K9 Thor, Sergeant Gannon acquired his beloved K9 patrol dog Nero, who was also shot and injured at the scene of the crime but was rescued and is expected to survive and return to the Gannon family.

Sergeant Gannon leaves a legacy of high moral integrity, infectious humor, and collaborative work with colleagues. He enjoyed travel, working with his hands, volunteering his time to Big Brothers Big Sisters of Cape Cod and the Islands and being outside.

He loved spending time with his family and friends.

Join our Newsletter for the latest news right to your inbox