ALBUQUERQUE, N.M. >> A nearly three-week murder trial that scrutinized the shooting death of a homeless man by Albuquerque police fell short of settling the fates of the two former officers, with jurors saying they were deadlocked on second-degree murder charges against the men.

Nine jurors wanted to acquit Keith Sandy and Dominique Perez in the March 2014 shooting that touched off protests in New Mexico’s largest city, and three were holding out for a guilty verdict, leading Judge Alisa Hadfield to declare a mistrial Tuesday after more than two days of deliberations.

“These officers followed their training to a ‘T’,” said defense attorney Sam Bregman. “When cops follow their training they shouldn’t be prosecuted for it.”

The case in Albuquerque marked a rare effort by prosecutors to bring murder charges against officers, coming at a time when police shootings have rocked cities nationwide. Sandy and Perez shot James Boyd near his Albuquerque campsite, with three bullets striking him in the arms and back at the end of an hourslong standoff.

The trial’s outcome means a decision on whether to retry the case will likely be in the hands of Raul Torrez, a Democrat and former federal prosecutor who is running unopposed for the district attorney position in Albuquerque. He said he would not make a decision on how to proceed until after a detailed review of evidence and consulting with the case’s special prosecutor.

He’s expected in January to replace the outgoing district attorney, who was removed from the case because of a conflict of interest with police.

“This is an extremely important case for our community and we must not rush a decision about how best to proceed,” Torrez said.

Bregman said he hopes Torrez considers the jury split in favor of acquittal and decides to not pursue another trial, which would allow the two officers to get on with their lives.

Sandy, a detective who took an early retirement after the shooting, collects a pension of more than $3,000 per month. He is 41.

Perez, who is 35 and a former SWAT officer, was fired from the Albuquerque Police Department under a city policy after he was charged and is petitioning to get his job back.

Both could have faced up to 15 years in prison for second-degree murder if they had been convicted.

The mistrial in their case followed 12 days of testimony that included the two former officers taking the witness stand to defend their actions and prosecutors outlining a series of fateful moves by police that she says escalated the encounter before Boyd’s death.

The courtroom was silent as the judge announced the mistrial, and the defendants left court without making a comment. Albuquerque police union members were seen tapping other officers on the shoulder and hugging each other after the news.

“What is there left to say?” said Luis Robles, the attorney for Perez. “Two and a half weeks were devoted to an incident that spanned only three and a half hours. Of the twelve people who mattered, nine jurors agreed with our message.”

The defendants said they opened fire because Boyd had two pocket knives and they believed he posed a deadly threat to a K-9 handler who had lost control of his police service dog and chased the animal, bringing him within 10 feet of Boyd.

Sandy and Perez were among 19 officers who swarmed a hillside where Boyd was camping illegally over the course of several hours on March 16, 2014. The camper had pulled a pair of pocket knives on the first two officers to respond to complaints about his presence several hundred feet behind an Albuquerque neighborhood, prompting them to call for help.

By the time the standoff ended, officers had brought rifles and handguns, tactical gear, flash grenades, stun guns and K-9 units — a show of force that the prosecutor questioned throughout the trial. Sandy was blamed by the prosecution for taking a central role in decisions that escalated the encounter and agitated Boyd, including a move to interrupt a crisis intervention officer’s negotiations aimed at trying to get him to abandon his knives.

Sandy was a detective on a team responding to the Boyd encounter that came under harsh criticism soon after the fatal shooting by the federal investigators over what they found to be a “culture of aggression” within the Albuquerque Police Department. Known as the Repeat Offenders Project, Sandy’s unit was dismantled after the Justice Department investigation and he retired.

The shooting encapsulated the Albuquerque department’s troubles in the past several years. The U.S. Justice Department investigated more than 20 deadly police shootings between 2010 and 2014, leading to court-ordered reforms that included a new use-of-force policy and SWAT and crisis intervention training. The department also was found to have poor policies and training for officers encountering suspects who are mentally ill.

Defense attorneys argued the case was not about how police handled the encounter but whether Sandy and Perez were justified in shooting Boyd, saying they were at the mercy of decisions made by higher-ranking officers and a system that had made them into default mental health professionals.

Special prosecutor Randi McGinn said she was not surprised that the 12-person jury was deadlocked, considering the shooting has divided the broader community in Albuquerque. She hopes the case leaves a lasting legacy, regardless of the next step.

“I think the discussion we have to have as a community is do we want Dirty Harry or do we want a peace officer,” she said. “I think we are beyond the Dirty Harry days.”

About two dozen activists arrived at the courthouse Tuesday to protest the mistrial, including one who carried a “wanted” poster for Sandy. They called for the case to be retried.