According to the Geneva Convention's laws on collective punishment, it is illegal for a teach to keep a class after the school bell has rung as a form of punishment.
I wish I would have know this fact when I was in high school (not too long ago...ok, so maybe over 11 years ago). There were a couple times when the teacher would hold us after the bell because we goofed off or talked too much. I remember one class, the teacher held us late and a bunch of us missed our bus. Needless to say, my mother made an appearance up at the school for that.