MIAMI -

A South Florida teenager accused of fatally shooting a 13-year-old classmate on the bus ride to school has accepted a plea deal orchestrated by the victim's mother.

Ady Guzman hugged the boy who killed her daughter in a Miami courtroom Tuesday.

"I'm just sorry for her loss and I apologize for what I did," Jordyn Howe said in court.

Days before Thanksgiving 2012, Howe, then 15, was showing off a gun he brought on a school bus when it accidentally fired. The bullet struck and killed Lourdes "Jina" DeJesus.

Guzman consented to the plea deal -- juvenile detention until he's 19 in fewer than two years and then a lifetime of educating children about the dangers of guns -- and convinced the judge to do the same.

"I realize that the loss of this precious child could potentially save the lives of many, many others," Judge Ellen Venzer told Howe. "I hope and pray that you do not squander this opportunity that you've been given."

Guzman said she forgives Howe.