MIDLAND, Texas (AP) — A sexual assault suspect has been sentenced to life in prison without parole for killing a West Texas deputy as he tried to serve a warrant.

Dan William Higgins of Midland pleaded guilty Thursday to capital murder and aggravated assault on a peace officer.

The plea deal means Higgins avoids a possible death penalty for the Oct. 9 slaying of Midland County sheriff's Sgt. Mike Naylor.

Higgins was sought on an aggravated sexual assault warrant. Investigators say Naylor was shot in the head during an exchange of gunfire with the suspect.

Higgins barricaded himself in the home for several hours before surrendering.