An Albuquerque police officer and retired detective who killed a homeless man last year pleaded not guilty Friday to second-degree murder charges stemming from the on-duty shooting death that unfolded after a standoff.

Officer Dominique Perez and now-retired Detective Keith Sandy entered their pleas at a hearing in New Mexico's Second District Court.

A judge ruled last month there was probable cause for the men's case to go to trial. The decision followed a two-week preliminary hearing in which Special Prosecutor Randi McGinn argued evidence that James Boyd was shot in the side and back indicated he posed no threat to officers when he was killed.

Boyd, 38, was camping illegally in the foothills of the Sandia Mountains when he was shot in March 2014.

His death, captured on video, prompted rallies and protests in New Mexico's largest city, including one that closed City Hall during a City Council meeting. It preceded a broader national debate about police-involved shootings and officers' use of force, and led to reforms within the Albuquerque Police Department.

Defense attorneys contend Boyd, who was schizophrenic, presented a danger and had threatened officers, leaving them no choice but to shoot as their training had taught them.

Footage from an officer's helmet camera of the shooting and the standoff that preceded it shows Boyd turning away and apparently surrendering when officers detonate a flash bomb near him. He then drops his bag and pulls two knives before Perez and Sandy shoot him.

Boyd was transported to a hospital, where he died after his arm was amputated.

Perez and Sandy could face up to 15 years in prison if convicted of second-degree murder. A voluntary manslaughter conviction carries a term of up to three years.