Sergeant First Class Joseph P. Mayo told a court martial in Germany that the men of Middle Eastern appearance were shot in the back of the head with nine-millimetre pistols and their bodies dumped in a Baghdad canal.
"I thought it (the executions) was in the best interests of my soldiers," Mayo told the court after pleading guilty to murder and conspiracy to commit murder.
He said that the men had been arrested after a number of attacks on their unit, and that in the same building troops had found two sniper rifles, AK-47 assault rifles and a duffel bag full of ammunition.
According to documents quoted by the New York Times, the US soldiers were told by superiors to release the men for lack of evidence.
Mayo, 27, is one of seven soldiers implicated in the case, and one of three non-commissioned officers to be tried for murder. The court sentenced him to no more than 35 years in prison, and he eligible for parole in 10 years.
Master Sergeant John E. Hatley, the most senior soldier present, is to stand trial charged with murder in Germany on April 13, an army statement said last week.
Co-defendant Sergeant Michael P. Leahy, an army medic, was sentenced in February to life in prison with the possibility of parole. Mayo faces the same minimum sentence.
Two other soldiers have pleaded guilty to lesser charges and been sentenced to prison terms of less than a year, US media reports said, while the army has dropped criminal charges against two other sergeants, an army spokeswoman said.
Mayo was expected to be sentenced later on Monday. Another charge of obstructing justice was dropped.
All the soldiers were with the 1st Battalion, 18th Infantry Regiment, then part of the 2nd Brigade of the 1st Infantry Division in Iraq, and now in the 172nd Infantry Brigade based in Germany.
A character witness in the trial, First Lieutenant Benjamin Boyd, said that at the time of the incident the troops were at a combat outpost in southwest Baghdad that was on a "significant fault line" between Sunni and Shia areas.
"I hold fewer people in higher regard," Boyd said of the defendant. "I couldn't have asked for a better platoon sergeant."
Another witness, a captain, said there was an atmosphere of "frustration and fear" among the soldiers because of a high frequency of attacks and the difficulty of keeping prisoners in custody.
The men were "not adequately trained," and frustrated that prisoners were often released after two or three days in custody, only to carry out further attacks.
Several US troops have already faced trial in connection with alleged or proven killings in Iraq, at courts both there and in the United States.
In one case, eight marines were initially charged in connection with the deaths of 24 Iraqi civilians in the town of Haditha, west of Baghdad, in November 2005.
So far, at least seven of the accused have either been acquitted or had charges withdrawn before a court martial.
In another case involving the rape and murder of a 14-year-old Iraqi girl and the killing of her father, mother and younger sister, four soldiers were convicted by a court martial and handed sentences of up to 110 years in prison.
The last defendant, Steven D. Green, is to be tried next month in a civilian court in Paducah, Kentucky and could face the death penalty if convicted.