An Arkansas juvenile court judge said he did not have the authority to set a specific sentence for 14-year-old Mitchell Johnson and Andrew Golden, 12, so he left state authorities with the decision on how long to keep the boys behind bars.
They were both under 14 at the time of the attack and could only be tried as juveniles, so they cannot be held in custody beyond their 21st birthday.
Arkansas does not currently have a facility equipped to hold the boys beyond the age of 18 so, unless one is built, Johnson could be free in four years and Golden within six.
The two defendants were brought to the Craighead County courthouse from a detention centre seven miles away under heavy security.
As they arrived in separate police cars, officers surveyed the area with binoculars from rooftops and a bomb-sniffing dog worked the area around the courthouse.
Both boys were dressed in blue jeans and casual shirts and were handcuffed to chains at their waist. They appeared bewildered as they were rushed into the courthouse.
The boys had been held under tight security at Jonesboro's youth detention facility since the afternoon of the shootings.
The relatives of their victims and some journalists were assigned seats at the so-called adjudication hearing, which under juvenile code is the equivalent of a trial for adults.
A lawyer for Andrew Golden had argued that the boy took part in the shooting, but was insane at the time and not mentally competent to understand the hearing.
But Juvenile Court Judge Ralph Wilson Jr rejected Golden's argument and found him guilty after a two-hour trial.
Johnson, who turned 14 yesterday, apologised to his victims' families and pleaded guilty to five counts of capital murder for his part in the attack, which killed five people and wounded 10 others at the Westside Middle School in Jonesboro, Arkansas, on 24 March.
"To the judge and to all I have affected, I am sorry. If I could go back and change what happened, I'd change it," he said in a statement during his sentencing hearing in Jonesboro.
Although police said the two boys clearly planned to kill their targets, Johnson said he had not planned to hit anyone.
"I thought we were going to shoot over their heads. We didn't think anybody was going to get hurt. I am sorry. I have also asked God for forgiveness and that he will heal the lives of the people I have hurt by my actions," he said.
Golden declined to make a statement. He had earlier pleaded not guilty to the murder charges, but his attorneys presented no defence after prosecutors quickly outlined their case against him and Judge Ralph Wilson found him guilty, or "delinquent" in the jargon of juvenile law.
Golden's lawyers said they would appeal the verdict and even Johnson's father protested alleged violations of his son's legal rights and claimed Arkansas' youth detention facilities were rife with severe problems, including rape of its inmates.
"I am not going to allow my son to stay in Arkansas," Scott Johnson told reporters after the sentencing hearing. "Further appeals will be filed and we're going to get him the hell out of here. This isn't the place for a rabid animal, to say nothing about a 14-year-old boy."
He said his son should be punished, but also deserves the chance to be rehabilitated. He shed no new light on exactly why his son opened fire on dozens of children in a premeditated attack. "He doesn't have an answer for why."
The two boys took up position in woods near the Westside Middle School and opened fire with powerful rifles and handguns on dozens of students they had lured out into the schoolyard by setting off a false fire alarm.
Four girls aged 11 and 12 and a woman teacher died in the hail of gunfire. Nine other students and a second teacher were wounded.
Dozens of the victims' relatives attended yesterday's hearing and several wept openly as prosecutors presented a brief overview of their case, including ballistic evidence detailing which bullets struck which victim and where.
Lloyd Brooks, an uncle of 11-year-old Natalie Brooks who was killed in the ambush, was one of five relatives allowed to address the court and he noted that Johnson was spending his 14th birthday in court for a senseless murder.
"We celebrated Natalie's birthday on 26 May. We brought flowers to her grave," he said, his voice shaking.
Mitchell Wright, whose wife, Shannon, died when she threw herself in the line of fire to protect her students, told the two killers his young son still looks for his mother.
"I have to explain his mother is in Heaven and can't come back. You robbed a three-year-old boy of his innocence."
As he spoke, Johnson appeared close to tears, but Golden remained stern- faced and showed little emotion.
The Jonesboro attack was the deadliest in a string of nationwide school shootings by disturbed students and focused attention on the easy access many youngsters have to guns.
Some students at Westside Middle School said they thought Johnson had planned the attack out of anger after a girl at school said she did not want to go out with him.Reuse content