Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A New Mexico district attorney will not retry two former Albuquerque police officers who had been charged in the death of a homeless man, after a previous jury deadlocked in the case.

Bernalillo County District Attorney Raúl Torrez said Friday that it was unlikely that a new jury would convict Keith Sandy and Dominique Perez in the 2014 death of James Boyd.

"The scope of the case is largely set and the remaining available charges are not likely to be proven beyond a reasonable doubt," Torrez said in a statement. He said the decision comes after a review from district attorneys from around New Mexico, and two of his prosecutors.

Police have said Boyd, 38, was clutching two knives when he was shot while camping in an unauthorized area of the city's Sandia foothills on March 16, 2014.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Defense attorneys argued Perez and Sandy fired to protect an officer who made a mistake and got too close to Boyd and could have been stabbed. Perez and Sandy fired six shots at Boyd, fatally wounding him. Stun guns and bean bag rounds were also used in the standoff.

The killing of Boyd, who was mentally ill, sparked protests. Protesters clashed with officers in riot gear, and police used tear gas.

Sandy and Perez were charged with second-degree murder. A jury in October deadlocked 9-3 with the majority voting for acquittal, and the judge declared a mistrial after two days of deliberations.

Related: Mistrial Declared in New Mexico Police Shooting Case

Lawyers for Sandy said in a statement to KOB that they were pleased with the decision not to retry the case, and "this case should have never been charged in the first place."

In this Aug. 18, 2015 photo, former Albuquerque Detective Keith Sandy, left, and officer Dominique Perez speak with attorneys during a preliminary hearing in Albuquerque, N.M. Russell Contreras / AP

The murder charge against Perez was dropped in November, NBC affiliate KOB reported at the time, but it could have been refiled.

Albuquerque's police chief in a statement Friday called the shooting "a very difficult event in our community."

"We have learned much from it," Police Chief Gorden Eden Jr. said. "Through our ongoing reform efforts, we strive to be the banner police department in the nation and will continually grow and improve policing in Albuquerque."

Torrez said reviews of the case showed there was little chance of a different outcome at a second trial.

"James Boyd’s life and his death should serve as a powerful lesson to us all," he said. "And although I do not believe a second trial is in order under these circumstances, it is my sincere hope that we come together and move forward as a community to prevent this kind of tragedy from ever happening again."

Sandy retired from the police force in 2014, while Perez was fired last year after both men were arraigned. Perez' attorney told KOB that he would like to return to the police department. A spokesperson for the mayor told the station the police department is still reviewing the matter.