A judge sentenced a Milwaukee teen to more than two decades in prison for his role in the fatal shooting of a 12-year-old girl as she helped her family unload groceries outside their home last year, a newspaper reported Friday.

Prosecutors charged 18-year-old Benjamin Garrett and 17-year-old Cornell Henard, saying one of them opened fire on Olivia Schultz and her mother, Celeste Wilson, in October. Garrett pleaded guilty in March to first-degree reckless homicide and first-degree reckless endangerment, and was sentenced Thursday to 22 years in prison, the Milwaukee Journal Sentinel reported. Henard is scheduled to be tried in July.

CHILD FATALLY SHOOTS ANOTHER CHILD IN SUBURBAN CHICAGO SHOOTING

The proceeding was delayed about 45 minutes after Garrett and Olivia's families got into a fight outside the courtroom. About 40 people in the courtroom rushed into the hall to take part in the fight before sheriff's deputies could break it up, the newspaper reported. The judge resumed the hearing after ordering everyone except Garrett and Olivia's parents and reporters to leave the courthouse.

Wisconsin Fox News graphic

Benjamin Garrett, 18, of Milwaukee has been sentenced to 22 years in prison for the fatal shooting of 12-year-old Olivia Schultz. (Fox News)

According to prosecutors, Olivia's family had just returned from grocery shopping on Oct. 10 when two masked teens approached them in the alley behind their home. After Wilson's husband went inside, one of the teens pulled out a gun. Wilson pleaded with him not to do anything and the teens kept on walking. They were about four houses away when one of the teens opened fire on the family. Wilson was hit in the back and Olivia was killed.

2 CONNECTICUT TEENS CHARGED IN 12-YEAR-OLD'S SHOOTING DEATH

Police couldn't determine who fired on the family. Prosecutors brought identical charges against Garrett and Henard. Henard contends that Wilson's husband, Darryl Schultz, came out from the house with a gun and started shooting at the teens. Darryl Schultz has said he only got his gun after the teens opened fire, according to the report.

CLICK HERE TO GET THE FOX NEWS APP

Garrett apologized to the family in court. His mother, Teisha McCoy, said his father left when he was a toddler and he struggles with poor mental health. She said that she kicked him out of their home for "disrespect."