The wife of a man who had held 23 children hostage and was killed by the police in Uttar Pradesh's Farrukhabad district has died after being beaten up by the villagers.

Twenty-three children were rescued and the captor was killed by the Uttar Pradesh Police after an eight-hour standoff and encounter that started on Thursday evening in Farrukhabad district.

The incident took place at Kasaria village in the afternoon when the accused invited the children to his daughter's birthday party. He held them hostage inside the house and refused to talk to anybody.

The man, identified as Subhash Batham, was a murder accused out on bail and had taken the children hostage on the pretext of inviting them for a birthday party.

Soon after the encounter ended and the man was killed, his wife was dragged out by villagers and beaten up mercilessly. Bricks and stones were thrown at her, reports said. She was admitted to a hospital in critical condition and succumbed to her injuries.

There was no information from the police to suggest that the wife was an accomplice in Batham's plan.

"The woman has succumbed to injuries, we are waiting for post mortem report, further details on the cause of death will only come out after the report," Inspector General of Police, Kanpur Range, Mohit Agarwal, said.

Earlier in a press conference held around 2 am, Awanish Kumar Awasthi, UP Additional Chief Secretary and Principal Secretary (Home), announced that the person who was holding the children as hostage was killed in an operation and all children were safely evacuated.

"The operation ran for around 8 hours. We tried to engage him constructively through talks but we got information that he had firing capability and there was a possibility that he had explosives in his possession. He was threatening to carry out a blast," Director General of Police (DGP) OP Singh said.