The boy, who has not been identified because of his age, brought a gun to Berrendo Middle School on Jan. 14 and opened fire in the gym before classes began. A teacher approached him and convinced him to drop the weapon, officials told the Los Angeles Times on the day of the shooting.

He was charged as a juvenile because state law bars charging minors as adults unless they are at least 14. Last month, he pleaded no contest to charges of aggravated battery with a deadly weapon. The boy has since turned 13.

Prosecutors sought the maximum punishment, while the boy’s lawyers asked that he be put into treatment for two years and then released when doctors determined he was no longer a threat.

After a daylong hearing Wednesday, District Judge Freddy Romero agreed with prosecutors.

The injured students, Nathaniel Tavarez and Kendal Sanders, testified at the hearing.

"My eyes continue to be a problem and require many surgeries," said Nathaniel, 12, who was shot in the face and neck. "Still to this day, I have to go to many doctor's appointments."

Kendal, 13, was shot in the shoulder and, her family said, still has lead pellets in her body. Kendal said in a statement read by the prosecutor in court that she forgave the boy.

Prosecutor Matthew Chandler introduced the shooter's notebook, which detailed the boy's plan to take revenge on those he believed had bullied him.

"Hi, everyone," Chandler read from the notebook. “If you’re reading this, I’m probably in jail. I did what I wanted to do. ... I grabbed a .20-gauge shotgun and heavy-duty saw. ... Tomorrow will be fun."

Other witnesses included a school security officer, a teacher, a New Mexico state police officer and the boy’s father and grandfather.

Albuquerque television station KRQE live-streamed and live-blogged the hearing.

Amid heightened speculation about whether he will seek the Democratic presidential nomination, Vice President Joe Biden remains at least a month from a decision and has largely left preparatory work to a small circle of trusted longtime aides.

Perched in his wheelchair, "Big Jim" Blake confidently rolls the wooden floors of his old shoot-'em-up saloon, founded here in 1893. The history of the Cowboy Bar is populated with drifters, outlaws and outliers, and its present proprietor brims with wild yarns and tall tales.

President Obama will impose even steeper cuts on greenhouse gas emissions from U.S. power plants than previously expected, White House officials said early Sunday, in what the president called the most significant step the country has ever taken to fight global warming.