In this WBUR file photo, Hope Coleman holds old photos of her son Terrence, who was fatally shot by Boston police. (Jesse Costa/WBUR)

A prosecutor has ruled that a Boston police officer was justified in fatally shooting a mentally ill man last year.

Suffolk County District Attorney Daniel Conley on Thursday released the findings of an investigation into the Oct. 30, 2016, shooting of Terrence Coleman in the city's South End. The 31-year-old Coleman died after being shot twice in the abdomen by Officer Garrett Boyle.

Conley said Boyle's use of deadly force was "a lawful exercise of self-defense and defense of others," because the lives of officers and emergency medical technicians were in danger as Coleman swung a 5-inch-long kitchen knife at them.

The knife police say Terrence Coleman was holding (Courtesy of the Suffolk County district attorney's office)

“In reaching these findings, I am keenly aware of the tremendous loss suffered by Mr. Coleman’s family members, particularly his mother, whose attempt to seek help for her son ended in his death during an armed confrontation with police,” Conley wrote in his report.

According to a statement from the DA's office, Coleman's mother called 911 after contacting her son's therapist and Tufts Medical Center "with concerns over his state of mind."

Immediately after the fatal shooting, Coleman's mother, Hope Coleman, denied that her son was holding a knife. "My son didn't have no deadly force," she told WBUR in 2016.