The two Massachusetts troopers who shot and killed a man suspected of killing a police officer last year acted reasonably and lawfully, prosecutors conclude in a report released Wednesday.

The Worcester County District Attorney's office says troopers' use of deadly force on 35-year-old Jorge Zambrano in May 2016 was appropriate.

Zambrano had shot Auburn police Officer Ronald Tarentino, 42, multiple times during a traffic stop early that day and fled to a home in Oxford, the report said. Tarentino died at a hospital.

The report says troopers obtained an arrest warrant for Zambrano for violating conditions of his probation and attempted to apprehend him at the home. Zambrano refused to surrender. A dog jumped out of a closet at almost the same time Zambrano began firing at troopers from a bedroom closet inside the duplex apartment, the report says.

Trooper A.J. Kardoos was struck and injured in the arm. Two other troopers then fatally shot Zambrano.

Kardoos has since recovered from his injury.

According to the report, shell casings found at the scene where Tarentino was shot matched a firearm found in the Zambrano's hands. The firearm had been reported stolen during a breaking and entering in Athol in 2014.

A toxicology report found Zambrano tested positive for cocaine metabolite and cannabinoid, a chemical compound found in marijuana.