— A man charged with firing a gun, causing a bullet to strike a 10-year-old girl in her bedroom, pleaded guilty Thursday in a first-of-its kind deal in North Carolina.

Deisy Medina was asleep in her bed last May, when a bullet fired in an upstairs apartment came through the ceiling and hit her in the abdomen. She spent more than a day at Duke University Hospital before being released.

James Scott Berish was charged with assault with a deadly weapon inflicting serious injury and possession of a stolen firearm in connection with the incident. He was sentenced to a minimum of 15 months in prison, but his sentence was suspended and he was placed on probation.

According to District Attorney Roger Echols, Berish’s case has been handled through the a restorative justice process, which is designed to bring together the victim and the person charged in the crime to create a space to discuss an incident and come to an agreement on how a perpetrator can take responsibility for their actions.

According to Echols, Medina’s family met multiple times with Berish, who read an apology and asked for forgiveness.

Echols said Medina and her family offered forgiveness and Berish presented Medina with a gift of art supplies before they shared a meal as part of the program.

As part of the restorative justice process, Berish pleaded guilty to all charges Thursday morning and will be required to speak at gun safety and awareness programs, Echols said.

Berish’s case is the first violent felony to be put through a restorative justice program in North Carolina.