An undercover Philadelphia officer will not face criminal charges in the fatal shooting of a Tacony man during a police drug investigation in August, state Attorney General Josh Shapiro announced Tuesday.

The action clears Officer Richard Nicoletti, a 29-year veteran assigned to the Narcotics Field Unit, from prosecution in the death of  Jeffrey Dennis, 36, who was killed on Aug. 20 while officers were preparing to raid his home on the 7100 block of Cottage Street.

Shapiro launched an investigation into the shooting after the case was handed off by Philadelphia District Attorney Larry Krasner due to a potential conflict of interest. Krasner, formerly a defense attorney, once represented Dennis.

"My office conducted a thorough four-month review of this case, interviewing witnesses, examining video footage, and analyzing all available evidence," Shapiro said in a statement. "We applied the facts to Pennsylvania law, and accordingly, no criminal charges against Richard Nicoletti will be filed by my office."

Shapiro's decision does not completely spare Nicoletti, who was placed on desk duty pending the investigation's outcome. The Police Department on Tuesday released a statement indicating that it has an ongoing investigation into the shooting.

"There remain phases of the Police Department's internal review process that have not yet been completed," the statement read. "We will provide additional comment as those phases move toward completion."

The District Attorney's Office declined to comment.

Dennis was a father of three children — ages 7, 11, and 17 — and had recently become engaged to be married. His family had demanded that the officer involved in the shooting be fired and criminally charged. The family could not be reached for comment Tuesday. Its lawyer, Lee Merritt, said Shapiro did not do enough.

"The AG has a responsibility to complete an investigation and empanel a grand jury. My biggest concern is that he didn't do that," he said.

The shooting happened shortly before 4:15 p.m. Officers preparing to search Dennis' home spotted him driving a Toyota Camry on nearby  Hegerman Street. Two unmarked cars moved to sandwich the Camry, blocking Dennis' route.

In a surveillance video released Tuesday by the Attorney General's Office, Dennis' car is seen ramming one of the unmarked vehicles as five plainclothes officers rush toward the Camry with their service weapons drawn. Another undercover officer runs toward the driver's side of the Camry with a long-handled hammer and shatters the window, sending glass flying.

In the video, Dennis attempts to turn his vehicle around. Nicoletti, in a gray T-shirt, approaches Dennis and shoots at near-point-blank range. The Camry stops. The footage ends. Medics pronounced Dennis dead minutes later.

Police Department policy forbids the discharge of shots into a moving vehicle. Protocols also prohibit shooting "to subdue a fleeing individual who presents no immediate threat of death or serious physical injury to themselves or another person."

But Shapiro said violations of police procedures do not always rise to the level of criminal charges.

"Whether the Philadelphia Police Department procedure was followed during this incident was not in the scope of our investigation, and will be addressed by Commissioner Ross and the department," Shapiro said.

Nicoletti could not be reached Tuesday. John McNesby, president of Fraternal Order of Police Lodge 5, said the case had been "fairly and impartially reviewed."

"It's unfortunate that someone lost their life that day, and we support Officer Nicoletti and other officers who were out there on the scene that day," McNesby said in a statement.

Ross did not respond to a request for comment. In August, he told an NBC10 reporter that "quite candidly, we have some concerns about the shooting … some of the tactics that were used."

Shapiro said he and senior investigators had met with the Dennis family several times, including Tuesday to inform them of the decision not to prosecute.

"Mr. Dennis' death leaves a family in mourning and children missing their father, and I am deeply saddened by that loss," Shapiro said. "I know the outcome of this case is frustrating to some, and I understand the very real mistrust that exists between our communities and law enforcement. I swore an oath to assess the findings of every investigation and apply them to the law."

Krasner in September charged a Philadelphia officer with murder in an on-duty shooting, the first time a city officer was charged in an on-duty shooting in nearly two decades. In October, a judge downgraded that case to third-degree murder. Officer Ryan Pownall was released on bail and is awaiting trial.

Staff writer Chris Palmer contributed to this article.