PHOENIX (AP) — One of two suspects charged in a series of random shootings that killed seven people in the Phoenix area pleaded guilty Friday to two counts of first-degree murder.

Samuel Dieteman also agreed to testify against his co-defendant, a move that may keep him from being executed.

Authorities say Dieteman, 32, and his former roommate Dale Hausner, 35, randomly shot and killed seven people, wounded 17 more and killed several animals during a rampage that continued for several months over 2005 and 2006.

Hausner has pleaded not guilty to seven murder counts and faces the death penalty if convicted.