People gather near a home in Watauga County, North Carolina, where two deputies were killed.
CNN  — 

Five people are dead, including two North Carolina sheriff’s deputies, after a check on a person who did not show up for work ended in gunfire and a 13-hour standoff, authorities said.

The sheriff’s deputies were ambushed and fatally wounded heading down to the basement of the home, Watauga County Sheriff Len Hagaman told reporters Thursday.

The sheriff’s office had been alerted Sunday that the unidentified suspect who killed the deputies as well as his mother and stepfather before taking his own life “might be a problem,” Hagaman said.

K-9 Deputy Logan Fox died at the scene in the Blue Ridge Mountain town of Boone, and Sgt. Chris Ward died after being flown to a local hospital, the sheriff’s office said in a statement.

The suspect was identified as Alton Barnes, 32, who authorities said also killed the residents of the home – Michelle Annette Ligon and George Wyatt Ligon.

Hagaman said “concerned folks” who knew the suspect had alerted the sheriff’s office but deputies did not “encounter him where we thought he would be.” The deputies on Wednesday did not think the suspect was home, according to the sheriff.

Deputies had looked for the suspect over the weekend to try to “get him away from someplace so we could have some more control over him,” Hagaman said.

The deputies were responding to a call for a wellness check Wednesday after the homeowner’s employer reported that the person did not show up for work and was not answering their phone, according to the statement.

A Boone Police Department officer was also struck by gunfire while attempting to rescue the downed deputies but his protective helmet prevented injury, the statement said.

A female deputy was able to safely retreat from the house, according to Hagaman.

Gov. Roy Cooper, in a statement, said he had spoken with Hagaman to offer condolences and assistance.

“We grieve for Sgt. Chris Ward, K-9 Deputy Logan Fox and the entire Watauga County law enforcement community today after these tragic deaths in the line of duty,” Cooper said. “These horrific shootings that claimed lives and loved ones show the ever-present danger law enforcement can encounter in the line of duty.”

Fox was a two-year veteran; Ward was an eight-year veteran who was married to his high school sweetheart and was the father of two, according to the sheriff’s office.

The standoff ended shortly before 11 p.m. Wednesday, the sheriff’s office said.

“This is an incredibly tragic situation and our thoughts and prayers are with everyone involved as well as their families and our community,” Hagaman said in a statement.

The investigation is being led by the North Carolina State Bureau of Investigation.

The shooter had barricaded in the home and occasionally fired in the direction of law enforcement officers, according to the statement.

Nearby residents were evacuated.

More than a dozen law enforcement agencies responded.

CNN’s Jamiel Lynch, Raja Razek and Giovanna Van Leeuwen contributed to this report.