Warning: Video includes explicit content.

No charges will be filed against the St. Paul police officer who fatally shot a man who rear-ended his squad vehicle and then ran at him with a knife last fall.

The Ramsey County Attorney’s Office determined Officer Steven Mattson’s use-of-force against Ronald Davis on Sept. 15 was justified under Minnesota law given the circumstances, according to a statement issued Thursday.

“The encounter Officer Mattson survived last summer was a haunting reminder of the dangers our officers too often face,” said Mayor Melvin Carter in a statement Thursday. “As we seek closure, our hearts are with the Davis family, with Officer Mattson and our police department family, and with all whose lives were forever changed by this tragedy.”

The Minnesota Bureau of Criminal Apprehension investigated the shooting, which included reviewing footage of the incident captured by police body-cams as well as still photos, according to the county attorney’s office.

Davis can be seen on the video footage running toward Mattson before the officer’s camera spins toward the sky and he is overheard saying “Holy (expletive).” A witness has said she saw Davis throw the officer to the ground.

Then Mattson’s flashlight fell and Davis, 31, can be seen holding a knife in one hand and the flashlight in the other as he continued to run at the officer, who had stood back up.

Mattson shouted, “Get away from me. Drop the knife. Drop the (expletive) knife. Drop the knife!,” and then he shot Davis.

Police Chief Todd Axtell wrote in an email to the department on Thursday, “This incident is an example of just how dangerous officers’ jobs can be. In an instant, a seemingly innocuous fender-bender turned into an attack on one of our officers. As I’ve said many times before, no officer ever wants to be forced to use deadly force — officers do not choose these types of situations, the situations choose them.”

The encounter lasted 12 to 13 seconds from the time Mattson opened his squad car door to the shooting. Davis was pronounced dead at the scene in the Hamline-Midway neighborhood at Thomas Avenue and Griggs Street.

Investigating officers spoke to Davis’s wife later that evening and she relayed that Davis left in her vehicle the previous day, adding that he had been acting “really weird” at the time, including telling her “you’re going to be a widow,” according to a memo submitted to Ramsey County Attorney John Choi earlier this month by staff attorneys who reviewed the case.

The memo went on to say that methamphetamine and THC were found in Davis’ body when he died.

The Ramsey County Attorney’s Office released the memo Thursday afternoon, along with a second one written by Choi that supported his attorneys’ decision.

Investigating officers also interviewed Mattson about what happened. He told them that Davis came at him with “wide eyes” while making noises that sounded like “little grunts.”

Wielding a knife in his right hand, Davis looked like “he was going to stab me,” Mattson told the officers, according to the staff memo.

He said he tried to “create distance” by moving away from Davis and giving him verbal commands to drop the knife, but said Davis didn’t listen.

Instead, he continued to “charge toward him,” the memo continued, prompting Mattson to shoot him twice.

Had he not fired, he told officers he thinks Davis “would have killed (him),” the memo said.

Investigators also interviewed witnesses. One said they saw Davis rush the officer after ramming his vehicle into the squad, and then “chasing after the officer who kept telling him to stop and then pop, pop, pop,” according to the memo.

The witness added that he thought the officer’s actions were “clearly provoked.”

Two others witnesses also described watching Davis come after the officer as Mattson directed him to stop, the memo said.

Jeff Noble, a retired police officer and law enforcement consultant based in Rancho Santa Margarita, Calif., reviewed the investigative materials at the request of the Ramsey County Attorney’s office. He found that Mattson’s use of deadly force was “objectively reasonable.”

Noble wrote in a letter included as part of the staff memo that “a reasonable police officer in this situation would have used deadly force as Mr. Davis was an immediate threat of serious bodily injury.”

Choi’s office also relied on Noble’s expertise in 2017, when it called him as an expert witness in the prosecution of Jeronimo Yanez, the Falcon Heights police officer acquitted of manslaughter in the fatal shooting of Philando Castile.

In that case, Noble called Yanez’s use of deadly force “unreasonable” and “excessive.”

Mara H. Gottfried contributed to this report.