New York City police are searching for a man who stabbed and killed a six-year-old boy and critically wounded a seven-year-old girl as they took a lift up to a Brooklyn apartment to get ice cream.

Police flooded Brooklyn's East New York neighbourhood with extra officers to assist in the manhunt and reassure frightened residents.

Police described the attacker as a stranger who chose the victims randomly.

"This is particularly heinous crime," Police Commissioner William Bratton said. "Two young children in an elevator with no place to escape, and some character gets on and starts stabbing them? People have every right to be concerned."

Before the attack at 6pm on Sunday, the children had been playing together outside a city housing project under adult supervision. They went inside alone to get some ice cream from the boy's sixth-floor apartment when they were cornered by a heavyset man in his 20s. The man used a steak knife to stab each child multiple times. He fled on foot, leaving behind the knife.

Officers found the boy, Prince Joshua Avitto, in the lift and the other victim, Mikayla Capers, just outside the building.

Prince was pronounced dead at a hospital. Mikayla is in hospital in a critical condition.

"Thank God, Mikayla Capers is alive," Mayor Bill de Blasio said. "She is getting exceptional care. We are hoping and praying she can pull through."

Asked about reports that there were no security cameras in a building located in a neighbourhood that has seen a recent spike in violent crime, the mayor said the council would get an update on public housing security efforts later this week.

Police were investigating whether the same man may have fatally stabbed an 18-year-old woman on Friday a few blocks away. A similar knife was recovered at the scene of that slaying.

This article appeared in the South China Morning Post print edition as Boy dies, girl critical after New York lift stabbing