A grand jury indicted a 27-year-old ex-con yesterday who allegedly stabbed two kids in East New York, killing one, earlier this month.

Daniel St. Hubert allegedly stabbed 6-year-old Prince Joshua "PJ" Avitto and his 7-year-old friend Mikayla Capers inside an elevator just before 6 p.m. on June 1. Capers was stabbed more than a dozen times and suffered abdominal bleeding and a lacerated spleen, according to the Brooklyn district attorney's office.

Capers was released from New York-Presbyterian-Columbia University Medical Center, said Mayor Bill de Blasio at a news conference in East New York Wednesday.

St. Hubert was charged in a five-count indictment, including second-degree murder and second-degree attempted murder, according to court records. Hubert was held without bail in Brooklyn Supreme Court Wednesday.

The children were attacked inside the Boulevard Houses elevator as they were on their way to get ice cream. Capers, bloody and stumbling, walked out of the building, according to court records. She slipped and fell just minutes after authorities said St. Hubert fled from the housing complex.

A bloody knife found at the scene tested positive for Hubert's DNA, according to the Brooklyn DA's office.

The investigation into the attack was complicated by the lack of security cameras inside the public housing complex, which led to criticism from the mayor and police.

"We've all been taught a very, very painful lesson, but we have to take that moment and now act and rise above," de Blasio said while announcing work had began to install cameras at Boulevard Houses. "We owe it to these children. We owe it to the families. People will be about to see that something is changing, that it's physical, that it's real, that they can count on it."

He said surveillance equipment at 48 other NYCHA developments -- funding for which was allotted last July -- would be installed by year's end.

Hubert had been released last month after serving time for a domestic assault and has nine prior arrests. He has also been accused of assaulting a police officer and corrections officer, Chief of Detectives Robert Boyce has said.

St. Hubert was convicted of attempted murder in the second degree in June 2012, according to court records.

St. Hubert's is still being treated at Bellevue, said his lawyer, Edward Friedman. "I have to see what's going on. His mental capacity is certainly an issue," he said, adding that public perception has already branded St. Hubert as a 'monster' or 'butcher.'

"As far as he is concerned, I just don't care what the public thinks. I have a constitutional duty to represent him."

Police have said St. Hubert has not been ruled out as a suspect in the stabbing death of 18-year-old Tanaya Copeland on May 30. Copeland, an LIU Brooklyn student and aspiring nurse, was found stabbed more than 30 times on an East New York street just a few blocks away from the housing development.

Copeland's funeral was held yesterday, de Blasio said. There is a "very strong likelihood" that St. Hubert is connected, he said.

Police have also questioned St. Hubert about the attack of 53-year-old Kyle Moore, who was stabbed multiple times in his torso on the southbound platform of the 18th Street No. 1 station Wednesday. Police said Moore had gotten into an argument with several people before the 5:30 a.m. attack. He was taken to Bellevue Hospital Center in stable condition. No weapon was recovered, police said.

(with Emily Ngo)