The shooting happened at Redland Middle School, located at 16001 SW 248th Street (pictured right), about 2:40 p.m.
On Friday, the family identified the boy as sixth-grade student D'Angelo Marte. Classmate Pablo Sanchez said the incident happened in history class, where a student with a gun inside his backpack dropped the backpack.
Suddenly, Sanchez and others heard a bang, and said he saw Marte on the ground.
"He was laying down on the floor, gushing blood," Sanchez said.
Sanchez said he tore off his T-shirt and wrapped it around Marte's calf before paramedics arrived.
"Well, we heard a gunshot, and then supposedly they had shot the kid and the kid was my friend, but then they took him. They took him in the ambulance," said one girl.
According to Miami-Dade Public Schools spokesman John Schuster, Marte was airlifted to Miami Children's Hospital by Miami-Dade Fire Rescue as a precaution after the bullet grazed his leg.
By late Friday afternoon, parents said they received text messages from their children saying school was under "Code Red," or, on lockdown. By 4:30 p.m., students were released.
"We were just on lockdown, all the doors were locked. None of the kids were able to leave," said Redland student Marc Diaz. "No one was in the hallway at the time."
Marte is currently listed in stable condition. Schuster said it's unclear if the shooting was intentional or accidental.