BUFFALO, N.Y. -- Jean Sanchez, 14, pleaded guilty to second degree murder Friday, for the death of Ameer Al Shammari, 13, in May of 2014; just as his trial was about to begin. 

"We are gratified that neither family has to endure trial. Were there to be a trial, the testimony would be upsetting and graphic," said Michael Flaherty, first assistant district attorney for Erie County.  

"He didn't want to put his family through this, he didn't want to put the victims' family through this. He's extremely remorseful. He's wanted to take responsibility from day one," said Paul Dell, Sanchez's defense attorney.  

Sanchez, who was 13 at the time, was accused of stealing Al Shammari's phone.

"When Ameer confronted him to retrieve the phone, the defendant beat him, beat him unconscious and strangled him to death," said Flaherty.  

"At one point his intention was to physically injure him, and intimidate him, and that was going to be the defense at trial, but you look at the evidence in the case and his own statements, at a certain point, he took it a step further and he lost it," said Dell. 

The plea agreement came almost exactly three years after Al Shammari's family arrived in the United States from Iraq for safety. 

"He was so excited, the poor kid never had a childhood. His uncle worked for the U.S. Army, or the U.S. military, repairing vehicles, and so that put the whole family on death watches," said Flaherty. 

In addition to murder, Sanchez was charged with criminal sexual act, sexual abuse and petty larceny. As part of his plea agreement, those charges were dropped, and he will receive the maximum sentence allowed for someone his age convicted of intentional murder, which is 9 years to life. 

"This was asphyxiation, this was a strangulation, this did not happen instantly," said Flaherty, "This took planning, and effort and time. So he was appropriately charged as an adult."

"If he had be 12 at the time, we wouldn't be here, it would have gone to family court and he would have been prosecuted as a juvenile deliquent. The law in New York state, it's called the infancy law, was drafted in 1978, before then, no one under 16 could be prosecuted for a crime as an adult," said Dell.

The defense believes the law is antiquated, and while Sanchez waived his right to appeal his guilty plea and sentence, he is able to appeal the constitutionality of the law, which Dell said he will do. 

"I believe the statute is constitutional, we would argue that it is," said Flaherty. 

Sanchez is scheduled for sentencing December 10.