A man believed to have stabbed a 6-year-old boy to death and critically injured a 7-year-old girl in a knife attack in a public housing building elevator that didn't have security cameras was arrested Wednesday just minutes after the mayor and the police commissioner publicly identified him and appealed for help catching him, police said.

Daniel St. Hubert was picked up just after 8 p.m. in a residential neighborhood in Queens in connection with the death of Prince Joshua Avitto and the injuring of Mikayla Capers days earlier in Brooklyn, authorities said. No details were provided on how St. Hubert, 27, was captured.

St. Hubert was in custody and couldn't be contacted for comment Wednesday night. It was unclear if he had an attorney. Phone numbers at addresses registered to him were out of service.

St. Hubert has a history of violent assault, with nine arrests on his criminal record, including two for assaulting police and correction officers, and he was paroled on May 23 in a domestic-assault case, police said. He was sentenced to time behind bars after convictions for attempted murder and assault, serving three years in city jails and two years in an upstate prison, state correction records show.

Before the arrest, police Commissioner William Bratton, joined by Mayor Bill de Blasio, asked the public to help in catching the suspect, urging residents to call authorities if they saw him or had information about him.

"We need your assistance to apprehend this individual as soon as possible," Bratton said then.

Forensic evidence led to the identification of St. Hubert, said police, who didn't elaborate and provided no possible motive for the knife attack.

Before the Sunday evening assault, Prince and Mikayla had been playing outside the Boulevard Houses under adult supervision. Relatives and witnesses said they went inside alone when they were cornered by a heavyset man in his 20s.

The attacker used a steak knife to stab each child multiple times, police said. He fled on foot, leaving the knife outside the building, they said. Prince was found in the elevator, Mikayla just outside the building. Chicago Bulls power forward Taj Gibson says Prince was his cousin.

Police said they were investigating whether St. Hubert also may have fatally stabbed 18-year-old Tanaya Copeland on Friday four blocks from where Sunday's attack happened. A similar knife was recovered at the scene of Copeland's slaying.

The teenager's mother, Rochelle Copeland, had said earlier Wednesday it was "harrowing" no one had been caught.

The children's knife attack cast a spotlight on the issue of surveillance cameras because none was in place to capture any images of the attacker despite funds set aside by the New York City Housing Authority to pay for them.

About 58 percent of the 334 city housing developments, encompassing more than 2,500 buildings, have some cameras, according to Housing Authority testimony delivered this week to the City Council. But only 41 percent of the individual building stock has cameras, leaving the majority of lobbies, elevators and stairwells unwatched.

Meanwhile, the New York Police Department operates more than 7,000 cameras throughout Manhattan, particularly near Times Square, the World Trade Center and other tourist locations. Additionally, thousands of private cameras have been installed across the city's five boroughs, providing video coverage of much of the city's streets that can be used by police as evidence.

Across the city, major crime continues to fall, down 2.4 percent from this time a year ago. Major crime in public housing has ticked up slightly. Housing Authority buildings are the site of about 20 percent of the city's murders while they house only 7 percent of its population.