(CNN) -- A 9-year-old Arizona boy charged with fatally shooting his father and another man pleaded guilty Thursday to one count of negligent homicide under terms of a plea agreement that does not specify jail time but places him on "intensive probation."
The boy, who was 8 when the deaths took place in November, entered the plea in an Apache County (Arizona) Superior Court hearing. In exchange for the plea, two counts of murder were dropped.
The boy was accused of killing his father, Vincent Romero, 29, and Tim Romans, 39, who rented a room in Romero's home in St. Johns, Arizona. Both men were found dead at the home November 5, and police said the next day that the boy confessed to shooting them with a .22-caliber weapon.
"Detention will be at the discretion of the court," says the agreement, a copy of which was obtained by CNN.
CNN affiliate KNXV reported that the boy will not serve time in the state juvenile corrections system but could be sentenced to a county facility.
The agreement also says the boy must remain on probation until he turns 18 and must undergo diagnostic and mental health evaluations at the ages of 9, 12, 15 and 17½. Watch CNN legal analyst Jeffrey Toobin's analysis »
In addition, the boy will not be allowed to enroll in a school not located in a secure facility until a hearing is held to determine whether he poses a threat to others, and he cannot possess or use weapons or live in a home with weapons, the documents said.
"The state reserves the right to withdraw from this memorandum of agreement prior to disposition if the juvenile is charged with any additional delinquent or incorrigible offenses," the agreement says.
The boy signed the agreement in shaky cursive handwriting.
He appeared in court Thursday wearing jeans, a short-sleeve button-down shirt and hiking boots, according to KNXV. He sat with his mother and appeared upbeat until the judge accepted the plea agreement, and then he became upset, sitting with his head in his hands, KNXV reported.
Defense attorneys for the boy had sought to suppress his confession, saying he was not read his rights before being interviewed by police and child welfare workers, and no attorney or parent was present.
Apache County prosecutors had agreed in January that the boy's statements would not be used against him in court unless the boy took the stand and the statements were needed to refute his testimony. But prosecutors said they were not acknowledging that the boy's statements were obtained illegally.
Authorities released a videotape of the boy's police interview, in which he initially denied any involvement in the shootings but later said he shot his already-wounded father "because he was suffering."
The killings shook St. Johns, a town of about 4,000 residents near the New Mexico border northeast of Phoenix, Arizona.
The boy's mother, Eryn Bloomfield, said in a November interview on ABC's "Good Morning America" that her son is "a very good little boy" who has never been in any trouble beyond what's normal for a boy his age and had "a very good relationship with his father." Bloomfield, who is identified in court papers as Eryn Thomas, lives in Mississippi.
Bloomfield made it clear Thursday through her attorney that she did not agree with the plea deal and does not believe that her son was involved in the killings, according to KNXV. The boy will remain in her custody.