The 23 children held hostage were rescued after police killed the captor Subhash Batham on January 30.
At a press conference held at 1.20 am on January 31, Additional Chief Secretary (Home) Awanish Awasthi told reporters the children "the accused was killed and the 23 children were rescued safely".
The situation went on for eight hours after the accused invited the children aged between six months and 15 years to his daughter's birthday party at Kasaria village, OP Singh, the Director-General of Police (DGP) said.
Singh added that police had tried to "engage" the accused during the entire operation and were successful. He said Batham initially released a six-month-old girl by handing her over to his neighbour from a balcony.
The motive of the accused was not known immediately, but police said Bantham seemed mentally unstable.
Inspector-General of Police, Kanpur Range, Mohit Agarwal said Batham "fired six shots from inside the building" at those who tried to speak to him. Two policemen and a man have sustained bullet injuries.
Agarwal added that Batham had asked to speak to the local MLA, but refused to speak to the leader when he arrived.
Chief Minister Yogi Adityanath monitored the situation in Farrukhabad, which is nearly 200 km from state capital Lucknow.
"The CM as soon as he got to know about the incident called a meeting of the crisis management group and personally monitored the situation and ensured children are rescued safely," Awasthi said.
Earlier, a National Security Guard (NSG) team of NSG took a special aircraft to reach Farukhabad, a senior security official in Delhi said.(With inputs from PTI)