An Indian man who arranged a fake birthday party for his one-year-old daughter, then held more than 20 children hostage, has been shot dead by police.
Local media identified the man as Subhash Batham – saying he was accused of murder but out on bail.
Locals in Uttar Pradesh’s Farrukhabad district later beat his wife to death.
Police tried to negotiate with him during a 10-hour stand-off before forcing their way into the building.
The hostage-taker was killed in a shootout. All of the children, aged between six months and 15 years were brought to safety.
Batham’s wife, who has not been named, was then attacked as she apparently tried to flee. Police said locals threw bricks and stones.
“She had head injuries and was bleeding when she was taken to hospital,” senior police officer Mohit Agarwal told India’s NDTV.
The woman later died of her injuries. It is unclear if she was involved in the hostage-taking or not.
Local reporter Deepak Kumar Srivastava told the BBC that residents spent the night in terror.
“There was fear in the neighbourhood and nobody slept. Everybody was worried about the safety of children.
“The police tried to convince him to surrender for several hours. They called special forces when their attempt failed,” he said.
Batham had invited children from his village in Farrukhabad to a birthday party for his daughter. But instead of a party, he held everybody hostage in the building.
“He believed that locals were responsible for his arrest in the murder case and he wanted to take revenge,” Mr Srivastava added.
Only one six-month old girl was allowed out, when Batham handed her to a neighbour from a balcony, seven hours into the hostage-taking.
When neighbours alerted authorities and police arrived at the scene, he began shooting from the house.
“On learning that he had firing capabilities and after his bomb-threats, all senior police officials decided to attack him,” said Uttar Pradesh Director General of Police Om Prakash Singh.
“We tried entering the house…Subhash was killed during the encounter.”
During the shootout, his wife, two policemen and one bystander were injured.
According to India Today, Batham had earlier sent a letter to the local district magistrate, complaining about the lack of toilet facilities in his house, and saying he had been denied government housing.
He said he was a labourer and had an ailing mother who had to defecate in the open.
During the drama of the hours-long siege, several television channels appealed to Batham to contact them if he wanted to get his demands to the government or authorities.