The suspect had been barricaded in the home for hours before finally surrendering to law enforcement.

Massachusetts Gov. Charlie Baker tweeted that he was "heartbroken" after hearing about the officer's death and said his thoughts and prayers were with Gannon's "family, loved ones and the @yarmouthpolice after this tragic loss."

"MA is blessed to have courageous men & women who put their lives on the line to protect our communities every day," he continued.

The Boston Herald reported that police cruisers drove with their lights flashing as his body was transported from the hospital to the medical examiner’s office.