In addition to the 22 children who died, another 25 children and the school cook were in hospital undergoing treatment, P.K. Sahi, the state education minister. Three children were in serious condition.
Authorities suspended an official in charge of the free meal scheme in the school and registered a case of criminal negligence against the school headmistress, who fled as soon as 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.
Sahi said a preliminary investigation suggested the food contained an organophosphate used as an insecticide on rice and wheat crops. It's believed the grain was not washed before it was served at the school, he said.
However, local villagers said the problem appeared to be with a side dish of soybeans and potatoes, not grain. Children who had not eaten that dish were fine, although they had eaten the rice and lentils, several villagers told the AP.
Sinha said the cooked food and kitchen utensils have been seized by investigators. "Whether it was a case of negligence or was intentional, we will only know once the inquiry has been conducted," he said.
India's midday meal scheme is one of the world's biggest school nutrition programs. State governments have the freedom to decide on menus and timings of the meals, depending on local conditions and availability of food rations. It was first introduced in southern India, where it was seen as an incentive for poor parents to send their children to school.
Since then the program has been replicated across the country, covering some 120 million school children. It's as part of an effort to address concerns about malnutrition, which the government says nearly half of all Indian children suffer from.
Although there have been occasional complaints about the quality of the food served, or the lack of hygiene, the tragedy in Bihar appeared to be unprecedented for the massive food program.