NEWTON, Mass. (AP) — Two Newton police officers shot and killed a 28-year-old man who entered a candy store with a knife on Tuesday, authorities said.

Police received a call at about 1:45 p.m. from the store owner. Two officers arrived and located the man, who fled to his apartment above the candy store while in possession of a knife, Middlesex District Attorney Marian Ryan said at a news conference.

The officers followed him upstairs to the third floor and called for backup, including a mental health clinician, Ryan said.

Newton police fired a beanbag gun at the man at about 2 p.m., which was followed by a state trooper’s attempt to subdue him with a stun gun, Ryan said. The nonlethal force was unsuccessful and two Newton officers fired their guns, striking the man, she said.

The man was taken to a hospital where he was pronounced dead. His name is being withheld pending family notification.

No officers or other members of the public were seriously injured.

“It is always a tragedy when there is a loss of life here in Newton and we feel that tragedy deeply,” Newton Mayor Ruthanne Fuller said. “The Newton Police Department looks forward to cooperating fully with the district attorney and with the state investigation and we are so thankful there will be a thorough and complete investigation.”