A 12-year-old in Texas has been charged with capital murder after allegedly breaking into the home of a professional boxer and killing him. The boy could face a maximum of 40 years if convicted, a sentence that juvenile justice advocates are hoping he can avoid.

Boxer John Duane VanMeter, 24, was killed in his home on Wednesday evening, according to Uvalde, Texas, police, who said a woman in the house called 911 to report someone had broken in and shot her boyfriend.

Witnesses told NBC affiliate News 4 San Antonio that a male was seen running from the residence dressed in black, with a black bandana covering part of his face, before he was transported to Jourdanton Juvenile Detention Center.

Police did not identify the suspect. Numerous legal experts told NBC News they believe he is one of the youngest people to be charged with capital murder, the most serious type of felony.

The capital murder charge differs from first-degree murder in that it typically involves a special circumstance, such as a kidnapping, or the murder of a firefighter or police officer who is on duty.

In the Uvalde boy's case, prosecutors likely considered the robbery component to be the special circumstance, said Mandy Miller, a Houston-area attorney who represents several juveniles who were convicted of capital murder years ago and are trying to get their sentences reduced.

"It's a common practice for district attorney's offices to charge as high as they believe they can possibly make it and work their way down," Miller, who is not involved in the Uvalde case, said. "This case is obviously going to be complicated."

In states such as Texas that have the death penalty, crimes by adults charged with capital murder are punishable by death. But a Supreme Court case from 2005 banned capital punishment for juveniles in the United States.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Jason Chein, a psychology professor at Temple University who has studied adolescent brain development and decision-making, said that ruling was one of several important acknowledgments from the Supreme Court of the biological differences between juvenile and adult brains.

"Impulse control is something that we see continuing to develop at least into mid- to late adolescence. You're going to see improvements in impulse control even up to 16 years old. That's when it starts to level off and look like that of an adult," he said.

Youth offenders, like the boy in Texas, have a strong capacity to rehabilitate if given the proper tools, Chein added.

"The science is clear here, that there is potential for an individual who shows abnormal behavior as a 12-year-old, behavior that concerns us societally, to still become remediated and become a healthy, functioning, normal contributor to society as an adult," Chein said.

That's a position that's shared by Lindsey Linder, senior policy attorney leading youth justice work at the Texas Criminal Justice Coalition.

"When you say a 40-year sentence for capital murder, it may not be shocking to somebody's conscience. But for someone who's 12, you're looking at nearly four times the age that they're currently at that they would be serving," she said, pointing out that the U.S. Sentencing Commission considers 470 months or longer to be a "de-facto life sentence." "Obviously, I don't know the details of this case, but I definitely would implore the district attorney's office to strongly consider the mitigating circumstances."

Steven Halpert, the juvenile division chief for the Harris County, Texas, public defender's office, which does not oversee Uvalde, said Texas law does not allow the boy to be tried as an adult since he is under the age of 14.

Instead, Halpert said, prosecutors can go before a grand jury and get what's called determinant sentencing that will allow them to seek up to 40 years' prison time — enabling them to potentially keep the boy inside the justice system after he ages out of juvenile detention even though he is being tried in juvenile court. Halpert said he hoped the boy would not receive that lengthy of a sentence.

"There's some serious rehabilitation that needs to occur if the 12-year-old did commit this crime."

"With a 12-year-old, you're talking about the absolute lower end of brain development. People might say it's a heinous crime — obviously, someone died, which is horrible — but I don't care who the 12-year-old is, he cannot fathom the consequences of his actions at that age," he said. "That's never appropriate, putting a 12-year-old in prison for 40 years. There's some serious rehabilitation that needs to occur if the 12-year-old did commit this crime."

The Supreme Court has taken offenders' age into consideration in other cases as well, including a 2012 ruling that struck down statutes that required courts to sentence juveniles convicted of murder to life without parole.

Linder said the court needed to hear more about what other factors were at play in the boy's life to make a sentencing decision.

"When you're dealing with somebody this young, I think that you have time to work with them and see if you can't address the root cause of what caused the harm and set them on the right path, rather than just one moment, one mistake, and you throw them away," she said.

"Even kids who committed the most heinous of all offenses are capable of rehabilitation."

She suggested youth like him be placed in secure facilities that "look as therapeutic and residential as possible" and receive rehabilitation that is tailored for individual needs, as opposed to juvenile prisons that feel similar to adult ones.

"I hope the district attorney's office that's prosecuting this case has processes in place to account for youthfulness," Linder said. "Because even kids who committed the most heinous of all offenses are capable of rehabilitation."