The children started falling violently ill soon after they ate the free school lunch of rice, lentils, soybeans and potatoes.

The food, part of a program that gives poor Indian students at least one hot meal a day, was tainted with insecticide, and soon 22 of the students were dead and dozens were hospitalized, officials said Wednesday.

It was not clear how chemicals ended up in the food at the school in the eastern state of Bihar. One official said the food may not have been properly washed before it was cooked.

The children, ages 5 to 12, got sick soon after eating lunch Tuesday in Gandamal village, 50 miles north of the state capital, Patna. School authorities immediately stopped serving the meal as the children started vomiting.

Savita, a 12-year-old student who uses only one name, said she had a stomachache after eating the soybeans and the potatoes and started vomiting.

“I don’t know what happened after that,” Savita said in an interview at Patna Medical College and Hospital, where she and many other children were recovering.

The lunch was cooked in the school kitchen.

In addition to the 22 children who died, 25 children and the school cook were hospitalized, said P.K. Shahi, the state education minister. Three children were in serious condition.

Authorities suspended an official in charge of the free-meal scheme at the school and registered a case of criminal negligence against the headmistress, who fled when the children fell ill.

Angry villagers, joined by members of local opposition parties, closed shops and businesses near the school and overturned and burned four police vehicles.

Shahi said a preliminary investigation suggested that the food contained an organophosphate used as an insecticide on rice and wheat crops and may not have been washed before it was served. However, local villagers said the problem appeared to be with a side dish of soybeans and potatoes, not grain.

India’s midday-meal scheme is one of the world’s biggest school nutrition programs. It was introduced in southern India, where it was seen as an incentive for poor parents to send their children to school, and has since been replicated across the country, covering 120 million children.

There have been occasional complaints about the quality of the food served or hygiene issues, but the tragedy in Bihar seemed to be unprecedented for the program.

— Associated Press