An afternoon on the playground for students in an Oklahoma elementary school turned into a terrifying encounter after a dog came in through an open gate and attacked several of them, officials said.

The Oklahoma City Public Schools said on Twitter that several students were bitten at the Fillmore Elementary School when the dog entered the playground area.

Five students were transported to the hospital, and seven others were taken by their parents, FOX25 reported. None of the injuries were deemed critical. The children suffered superficial dog bites, while some had escape injuries as they attempted to run away, officials said.

GRAPHIC PHOTOS: TEXAS MAN DISFIGURED BY SAVAGE DOG ATTACK

"Dog came on and started to attack some of the kids, and of course kids began to scream and panic, which excites the dog and scared the dog even more," Capt. David Macy with the Oklahoma City Fire Department told FOX25. "His natural instinct was to keep biting and go after the kids."

The dog, a pitbull mix, was able to get inside the school, but a teacher tackled him before he reached any classrooms.

"I’m used to being able to do what needs to be done," Special Ed teacher Lee Hughes told FOX25. "It just worked out real well."

The incident took place at the Fillmore Elementary School. (FOX25)

Parents of children who attend the school said that the gates to the playground are always left open.

"I think they should follow more protocol, take a walk around before they let the kids out and make sure the gates are secure," David Landolfi, who has two children at the school, told FOX25.

FATHER SAYS GIRL, 10, ACCUSED OF KILLING HIS INFANT SON IS A ‘CRIMINAL’ WHO DESERVES TO BE IN HANDCUFFS

No teachers were injured in the attack, which has spurred school officials to review security in the wake of the incident.

"That’s a problem we’re looking at across the district, not just at Fillmore," said Tim Coleman, director of OKCPS security. "Making sure that if we need any resources to make sure those gates are secure. We have plans in place to put welded chains and gates that can’t be cut off on the fences."