The cows were moved inside the school in Sambhal on Tuesday. (Representational)

More than 200 cows were ushered into a government primary school in Sambhal district of Uttar Pradesh and locked in on Tuesday even when classes were going on.

The incident took place in Gonhat village. The farmers were upset as the stray cattle were destroying their crops, and they thought it best to lock them in the school.

On getting this information, Basic Shiksha Adhikari (BSA) Virendra Pratap Singh rushed to the school and asked villagers to clear the premises of the cattle.

As the terrified students locked themselves in their classes, police had to be called in to pacify agitated farmers and the cattle were later moved out.

The officer instructed the police to register an FIR (First Information Report) against the villagers who put the children's life in danger.

Additional BSA Rajendra Prasad said the villagers broke open the locked main gate of the school and moved animals inside the premises.

"As a large number of cattle entered the school premises, there was chaos all around and children playing in the ground ran for shelter," he said.

According to the headmaster Govardhan Singh, they somehow managed to lock around 80 children in classrooms to save them from cattle. The school has around 334 children enrolled with it.