A pupil has been permanently excluded from school and three others suspended after a photograph was taken of one of them with his genitals in a teacher's mug.
The prank, which happened in a corridor at Benfield School, Newcastle upon Tyne, left the unsuspecting female teacher distraught when she found out, as she had unwittingly used the cup afterwards.
It was believed that a photograph of the unpleasant trick was posted on the internet, and it is thought to have since been removed.
An investigation by the school revealed the boy who took the cup had been urging friends on Facebook to dare him to carry out risky or bad-taste pranks.
It is another example of the growing phenomenon of pupils using social networking sites to bully, abuse teachers or boast about misbehaviour in class.
One source said: "The photo was of the lad dangling his balls inside the cup belonging to the teacher.
"She later drank her tea from it."
It appeared the teacher was off work for some time after the incident, though she has returned now.
Another source said: "The boys saw the cup, in a classroom, which they then took.
"They did the deed in the corridor. It all came from one of them on Facebook asking his friends 'Who dares me to do this?"