ALBUQUERQUE, N.M. — The Latest on the trial of two former Albuquerque police officers charged in the shooting death of a homeless man (all times local):

4:30 p.m.

Attorneys have rested their case in the trial of two former Albuquerque police officers charged with second-degree murder in the shooting death of a homeless camper.

Now-retired Detective Keith Sandy, one of two officers charged, was the last witness to take the stand in 12 days of testimony.

He and former Officer Dominique Perez are charged in the March 16, 2014, killing of James Boyd.

Boyd, who suffered from mental illness, shouted threats at officers during an hourslong standoff but also told them he was afraid of them and feared for his life.

He was shot in the arms and back seconds after a flash-bang grenade was detonated in a failed attempt to take him into custody.

Attorneys are expected to deliver closing arguments Thursday before the case goes to jurors.

3:55 p.m.

Attorneys in the jury trial of two former police officers charged in the killing of a homeless camper have attempted to reconstruct the scene of the standoff that ended with the officers fatally shooting the man in the arms and back.

Now-retired Detective Keith Sandy’s attorney Sam Bregman jumped on a nearly 4-foot platform in the courtroom with fake knives in hand as Sandy stood on the floor several feet away to show the vantage point they say James Boyd, the man killed, had over officers.

Bregman is more than 6 feet tall, which was Boyd’s approximate height.

Special prosecutor Randi McGinn also climbed a ladder to mount the platform after placing blow-up, cardboard cutouts of the officers and a K-9 handler at different points in the courtroom.

The demonstration was meant to show jurors whether Boyd posed a threat when he was shot.

12:30 p.m.

A retired Albuquerque police detective says he regrets calling a mentally ill homeless camper a “lunatic” while saying he would use a stun gun on him about 90 minutes before he and another officer fatally shot the man.

Keith Sandy, who left the force after the 2014 shooting, testified Wednesday during his trial.

He and former Officer Dominique Perez have been charged with second-degree murder in the death of James Boyd, who was camping illegally in the foothills of the city’s Sandia Mountains.

Authorities say Boyd pulled two knives on officers responding to reports of his presence and the encounter escalated into an hourslong standoff that ended with Boyd’s fatal shooting.

Special prosecutor Randi McGinn has faulted officers for acting recklessly.

10:40 a.m.

A retired police detective standing trial in the on-duty shooting death of a homeless camper has taken the stand to to tesify in his defense.

Keith Sandy is describing his history as an officer with the New Mexico State Police and the Albuquerque Police Department. One of his lawyers is expected to question him about the March 2014 shooting that killed 38-year-old James Boyd.

The shooting captured on police video touched off protests in Albuquerque.

Sandy’s attorneys have said he had to shoot the knife-wielding Boyd to protect the life of a police dog handler who was within 9 to 12 feet of Boyd.

Attorneys for now-former Officer Dominique Perez outlined a similar argument before resting their case Wednesday morning. Perez and Sandy are on trial together.

9:45 a.m.

A former officer charged in the on-duty shooting death of a homeless camper says the man had time to react to repeated commands to get down on the ground and instead reached for his knives.

The testimony from former SWAT Officer Dominique Perez counters arguments that James Boyd was preparing to surrender or didn’t have enough time to follow officers’ commands before he was shot.

Perez took the stand for a second day Wednesday as his defense team’s final witness, saying Boyd posed a threat to a K-9 officer standing near the camper. Both prosecutors and defense attorneys have finished questioning him.

Perez and now-retired Detective Keith Sandy are standing trial on second-degree murder charges in Boyd’s March 2014 death.

Sandy’s attorney will begin calling witnesses to the stand Wednesday.

12:10 a.m.

A former Albuquerque police officer standing trial on a second-degree murder charge in the shooting death of a homeless camper will testify in his own defense for a second day Wednesday.

Dominique Perez was one of nearly 20 officers to respond to a 2014 police standoff with James Boyd — who suffered from paranoid schizophrenia and pulled knives on two officers who were first to respond to reports of his illegal campsite.

Perez told jurors Tuesday that he opened fire because a K-9 officer who did not have a weapon in hand appeared to come within arms’ reach of Boyd and his knives. Perez was standing downslope from the K-9 officer and Boyd during the standoff in the Sandia Mountain foothills.

An analysis later determined that the K-9 handler was roughly 9 feet from Boyd.