A mother is dead, and her two children are critically injured, after a man attacked them with a hammer, police said Wednesday.

The incident occurred just before 3 p.m. inside of an apartment building located on 53rd Street and Sixth Avenue in Sunset Park, the NYPD said.

According to police, a 47-year-old man, who police later as Liyong Ye of Brooklyn, hit the 43-year-old Zhao Zhao and her children, ages 3 and 5, after getting into a dispute with the mother. Police said it is unknown at this time what the dispute was about.

Police said the mother, her children and the suspect live in separate rooms of a three-room apartment located on the second floor that is occupied by three separate families. Ye lives in one room with his 9-year-old son, the mother and her two children lived in a separate room, and a third person lived alone in the third room, NYPD Chief of Patrol John Chell said.

The three victims were transported in critical condition to Lutheran Hospital in Brooklyn, where the mother died of her injuries, authorities said.

According to the NYPD, Ye was arrested by police officers when he tried to walk out of the building. He had blood on his body, Chell said.

"I think I can speak for all New Yorkers when I can say our community, our prayers are with this family at this time," Chell said.

Ye has been charged with murder, two counts of attempted murder, and two counts of criminal possession of a weapon.