A U.S. Marine sergeant accused of leading a massacre of 24 Iraqi civilians in Haditha pleaded guilty on Monday to dereliction of duty, ending the final prosecution stemming from a 2005 incident that brought international condemnation of U.S. troops.

Staff Sergeant Frank Wuterich, 31, entered his plea as part of a deal with military prosecutors in which more serious charges of involuntary manslaughter and aggravated assault were dismissed. Wuterich was initially charged with murder.

He now faces a maximum sentence of three months of confinement, forfeiture of two-thirds of his pay for three months and a reduction in rank when he is sentenced on Tuesday at the Camp Pendleton Marine Corps base north of San Diego, a base spokesman said.

Wuterich, 31, was accused of being the ringleader in a series of November 19, 2005, shooting and grenade attacks that left two dozen civilians dead in Haditha, a city west of Baghdad that was then a hotbed of insurgent activity.

The killings were portrayed by Iraqi witnesses as a massacre of unarmed civilians and brought international condemnation of the U.S. military.

Local witnesses claimed angry Marines had killed unarmed men, women and children after a popular comrade, Lance Corporal Miguel TJ Terrazas, was killed by a roadside bomb.

Lawyers for the troops involved argued the deaths resulted from a fast-moving situation in which the Marines believed they were under enemy fire.

Wuterich pleaded not guilty when the court-martial began in early January.

The court-martial was suspended last Wednesday by the presiding military judge, who ordered prosecutors and defence lawyers to seek a negotiated plea deal. The trial resumed on Friday for one day, and the plea agreement was announced on Monday morning.

Six out of the eight Marines originally accused in the case had their charges dismissed by military judges, and a seventh was cleared of criminal wrongdoing.

(Reporting by Marty Graham and Mary Slosson; Writing by Steve Gorman, Editing by Paul Thomasch and Philip Barbara)