SAN FRANCISCO (AP)  Merced County”s district attorney has concluded that police were justified in the shooting death of an 18-year-old student who went on a stabbing rampage at a central California university last month, injuring four.

District Attorney Larry D. Morse II announced Monday that a review showed that the death of 18-year-old Faisal Mohammad on Nov. 4 was warranted given the “imminent threat” he presented to officers.

Authorities say that Mohammad, a freshman from Santa Clara, California, burst into a classroom at the University of California, Merced and slashed fellow students over a dispute about a study group. The stabbings shocked the close-knit campus in central California.

“Criminal charges can flow from an incident like this, but in this case, the officer acted appropriately and in accordance with training and well accepted police procedure,” he said, adding that the office reviews all officer-involved shootings.

The prosecutor”s description of Mohammad”s final minutes matches testimony provided by another student who also witnessed the police chase.

Two officers were chasing Mohammad soon after the stabbings when he suddenly stopped to face them, knife in hand. The officers yelled at him to get on the ground and to put the knife down. He ignored the orders.

Instead, Mohammad appeared to lunge at one of the officers, Olaf Lopez, with the knife raised at shoulder height. According to the district attorney, Lopez shot once, but Mohammad continued to advance. The officer fired again, and this time Mohammad fell to the ground.

He was declared dead at the scene.

Previously, Merced County Sheriff Vern Warnke said Mohammed left behind a two-page “manifesto” explaining that he was angry with being kicked out of a study group and a detailed plan of revenge.

Authorities said they found no evidence of mental illness or other signs that the man described by family and friends as kind and humble might be violent. They also said background checks found no connections to organized hate or terror groups.

The FBI”s Sacramento office had previously issued a statement reiterating that Mohammad had not been on the agency”s radar before the Nov. 4 stabbings “occurred without warning or advance indication.”

FBI spokeswoman Gina Swankie said Monday that the investigation is ongoing.