Gladden said in court Tuesday that he talked to his mother about the plea prosecutors were offering him and decided to take it. He entered that plea in Baltimore County Circuit Court Tuesday morning, WBAL-TV 11 News reporter Barry Simms said. He also pleaded guilty to using a firearm in a crime of violence.

Gladden admitted that he took a double-barrel shotgun to the school on Aug. 27 and fired the weapon into the crowded cafeteria with the intention to kill.

Gladden gave mostly one-word answers to questions from the judge about his willingness to plead guilty, keeping his head slightly bowed with his long, reddish-brown hair slightly obscuring his face. His mother and a few other supporters sobbed and wiped their eyes as the teen entered his plea.

Judge Robert Cahill Jr. accepted the plea. While prosecutors pushed for life in prison for the teen, Cahill indicated he would take that sentence and suspend all but 40 years, Simms reported.

Sentencing is set to take place next week.

Gladden had faced trial as an adult after his request to be tried in juvenile court was denied earlier this month. Both counts involved 17-year-old Daniel Borowy, who was the teen hit by Gladden's shotgun blast. Borowy, who has Down syndrome, missed more than two months of school while recuperating from his injuries.

Borowy's family was not in the courtroom. Milton Borowy, Daniel's father, said he was pleased a plea deal had been reached.

"At least the admission of guilt is finally there," he said, later adding: "It's good to know that he is going to pay for his crime. I'm glad it didn't have to go to proving guilt. I'm glad he stood up and manned up and admitted it and pled guilty. That made me feel good."

Milton Borowy said his son is close to 100 percent healed, but he still has nightmares once or twice a week.

"It would have been nice if (Gladden) said and meant that he was sorry. It would be nice at this time. But he hasn't said it," Borowy told 11 News on Tuesday.

Earlier this month in court, Gladden called the shooting the stupidest and dumbest decision he's made in his life and said that he took the gun into the school wanting to die, Simms reported.

But the judge cited many reasons for his denial of the motion. He said he thought Gladden had no interest in handling his behavioral problems and also cited comments Gladden made about his admiration for Adolf Hitler and Charles Manson, as well as comments he made about the Sandy Hook Elementary School shooting.

Gladden's attorney, George Psoras Jr., has said the boy brought the gun to school to intimidate bullies and did not intend to shoot anyone.

Psoras told The Associated Press in a telephone interview after Tuesday's hearing that Gladden took the plea deal to give the Borowy family closure "and he wanted the public to begin healing from his actions."

Psoras said his client, like others his age, doesn't think rationally.

"He thought like a 15-year-old -- a very immature 15-year-old," Psoras said.

"It's clear from all the evidence that he thought about this a long time, and that he made the decision he was going to cause misery on others before taking his own life," Cox said.

Assistant State's Attorney Danielle Williams said during the hearing that Gladden asked a police officer after the shooting, "Can I get the death penalty? Because I wanted to kill him."

Gladden had expressed suicidal thoughts. At 6:27 a.m. on the day of the shooting, he wrote on his Facebook page, "First day of school, last day of my life." The Facebook page also included references to murder-suicide and to mass murderer Charles Manson.