Peter Arnold, prosecuting, said the incident took place on March 20 this year when Khan was teaching Maths to Year Two pupils, alongside an experienced classroom assistant.

He said the boy was sitting at a desk and added: “To put it neutrally, and there may be an issue as to what caused all of this, she was having problems with him.”

Mr Arnold said Khan was standing behind the youngster when he got a question wrong. “The defendant was upset about that and the long and short of it is that she had a plastic ruler in her hand and she hit the boy on the top of his head and the ruler broke,’’ he said.

“It is for that short action you are brought here to court. What she did was unlawful.”

When asked about the incident the boy said it had hurt and that he felt “sad and scared,” added Mr Arnold.

A teaching assistant said she had heard Khan shouting and the shouting became louder. In a statement she said: “I looked up again and a piece of ruler flew across the room.”

She said the boy had put his hand on his head after being hit by the ruler, and the defendant then told her that she had not meant to hit him so hard. The teaching assistant said she had later put a cold compress on the boy’s head.

Mr Arnold said because a new headmistress had recently been appointed at the school, the teaching assistant had been unsure what to do. But after a couple of days she told a caretaker who in turn told the headmistress.

He said the account put forward by Khan was that she had “tapped” the boy on the head with the ruler. She said the ruler had snapped, but not as a result of any force used by her.