A soldier pleaded guilty Thursday to murdering three detainees during a raid on a suspected Al Qaeda compound last year in Iraq.

Spc. William B. Hunsaker, 24, pleaded guilty to murder, attempted murder and obstruction of justice during a hearing at Fort Campbell.

As part of a plea agreement, charges that Hunsaker had threatened another soldier's life if he told authorities of the killings were dropped.

Hunsaker, 101st Airborne Division, was one of four soldiers charged in the killings that followed a raid at the Muthana chemical complex near Samarra, about 60 miles north of Baghdad.

The soldiers originally told investigators that they shot detainees because they were attempting to flee — a story they now say they made up — and that commanders told them to kill all military-age males.

The maximum sentence for the charges Hunsaker faces is life in prison. Military judge Col. Theodore Dixon said Hunsaker's pretrial agreement includes a lesser sentence.

Details of the plea agreement were to be announced later Thursday.

Three other soldiers were charged in the case.

Pfc. Corey R. Clagett, 21, and Staff Sgt. Raymond L. Girouard, 24, are awaiting courts-martial in the coming months.

An e-mail to Paul Bergrin, Clagett's attorney, was not returned, and his voicemail was too full to accept messages. Girouard's military attorneys have declined to discuss the case with the media.

Spc. Juston R. Graber, 21, pleaded guilty on Tuesday to a lesser charge of aggravated assault as part of an agreement to cooperate with prosecutors. He was sentenced to nine months in military jail.

Graber told a military judge that at least one of the detainees appeared to still be alive when he approached. He testified that Girouard suggested they put one man "out of his misery." Graber said he shot the man in the head.

The case is one of two involving soldiers from the 101st Airborne Division accused of killing Iraqis during a deployment to Iraq that ended in September.

Four other soldiers from the division's 2nd Brigade Combat Team are accused of raping and killing an Iraqi teenager and killing three others in her family last March. A former Army private also faces federal murder and rape charges.