Four others were acquitted, the spokesman, Abdul Sattar Bayrakdar, said in a statement released by his office.
claimed to have executed hundreds of recruits and soldiers captured last year outside Camp Speicher, a fortified Iraqi base near Tikrit.
Mass grave sites were uncovered
when Iraqi soldiers and Shiite militias seized Tikrit,
the hometown of former President Saddam Hussein
, from ISIS fighters this year.
Bayrakdar said sufficient evidence had been presented for the court to convict, "including the confessions of the defendants in the investigation phase, which matched the facts and the records of forensic evidence."
The statement did not give details of who the men were, when they were arrested or whether they were affiliated with ISIS.
In the past few months, Iraqi security forces have detained dozens of people accused of having links to the massacre, mostly from Salaheddin province.
Human Rights Watch described the "Speicher Massacre" -- as it has been dubbed in Iraq -- as the "largest reported incident" where "ISIS captured more than 1,000 soldiers fleeing Camp Speicher ... then summarily executed at least 800 of them."
Based on satellite imagery and witness testimony, the rights group last year was able to identity a number of mass grave sites inside Tikrit and the presidential palace complex.
The palace complex became ISIS' headquarters after the militants occupied Tikrit. Nine months later, Iraqi soldiers and Shiite militias retook the city after a fierce battle.
The missing soldiers' families
gave DNA samples to the Iraqi Ministry of Health last year so authorities would be able to match them to unidentified bodies the government might find.
Many questions remain unanswered about what happened last June and how hundreds and perhaps more than 1,000 Iraqi soldiers ended up in the hands of ISIS.