The Uttar Pradesh Police on Thursday night rescued over 20 children and women, including a six-month-old, who had been taken hostage by a murder accused inside his home in Farrukhabad district, The Indian Express reported. The 38-year-old captor was shot dead, police said.

Director General of Police OP Singh said the hostages were held for about eight hours, starting around 5.45 pm on Thursday. Among the hostages were the man’s wife and daughter. The children in the group were aged between six months and 15 years.

Subhash Batham, a murder accused out on bail, had invited the children home for his daughter’s birthday and then held them at gunpoint. However, he did not make any demands from the police to rescue the children. At one point, he threw a bomb out of a window at villagers and fired at them, police said.

“The accused was killed and there were about 23 children who were rescued safely,” Additional Chief Secretary (Home) Awanish Awasthi told reporters at a press conference at 1.20 am on Friday, PTI reported. There was an exchange of fire, in which the man’s wife was injured. Two policemen also suffered bullet injuries.

Additional Director General of Police PV Rama Shastri had said earlier on Thursday that a rescue operation was going on. “Quick Response Team and Special Operation Group team are there,” he added. “Anti-Terrorism Squad is on its way.”

Meanwhile, Chief Minister Adityanath convened a high-level emergency meeting on the matter.

Batham has four cases against him, including murder. All four cases were filed at the Mohammdabad Police Station in 2001.

“Around two months ago, Subhash was arrested in a robbery case,” Kathariya village pradhan Shashi’s husband Harbeer Singh said. “He came out of jail a month ago. Subhash fired at Anupam, a resident, and he suffered an injury in his right leg. He also threw a crude bomb from inside.”

Singh added that Batham demanded to speak to local Bharatiya Janata Party MLA Nagendra Singh Rathore. However, when the MLA arrived, the man fired from inside the house. The legislator escaped unhurt.