Police were called to the school Tuesday when the dogs were spotted on the playground during recess.
When the principal tried to grab the dogs, he was bitten.
Police say the same thing happened to an officer who tried to corral the Tibetan mastiffs.
After one of the dogs was shocked, the other dog became aggressive and was also shocked.
The dogs are now in custody of Animal Services.
The officer was treated for three puncture wounds on his leg and returned to work later in the day.
Also on HuffPost