Neighbors and a family friend of the Sunset Park woman who was beaten to death with a hammer say she regularly fought with her accused killer, who rented a room in her home.

The carnage unfolded around 2 p.m. on Wednesday, when police were called to a building on 52nd Street and Fifth Avenue. They arrived to find a 5-year-old boy and a 3-year-old girl with severe head trauma. Their mother, identified by police as Zhao Zhao, 43, also had severe head trauma and was pronounced dead at the scene.

Cops said they took 47-year-old Liyong Ye into custody down the block after he had tried to flee the building. Police recovered a bloody hammer at the scene.

Ray Huang, a friend of Zhao’s family, confirmed that Ye and Zhao frequently bickered over everything from differing sleep schedules to use of WiFi.

“They’re living together with different schedules,” Huang said. “It’s a problem. They should understand each other, but they don’t … Every day they have a little problem, and put together they have a big problem.”

Jason Zheng, 16, who lives on the same floor as Zhao and knew the family, said he often heard raised voices coming from the apartment where Ye rented a room from Zhao with his 9-year-old son.

On Wednesday, police said their argument turned deadly.

Video viewed by Gothamist of the aftermath of the attack shows police officers holding the kids, who are covered in blood. One officer can be heard saying he doesn’t think they should wait for the elevators, and the cops dart down the stairs with the children in their arms.

Neighbor Kokila Frank came out of her home across the street when she heard a commotion of honking and ambulances.

“Around maybe 2 o’clock, I heard a lot of sirens ... So I just came out to see what was going on,” she said. “And then at the same time, I saw two police officers clutching babies, one was… holding the baby like this, with all blood all over. And the second one also, same thing. The police, they were running, and they put the babies in the ambulance.”

A cellphone video shot by Frank’s husband shows first responders wheeling Zhao’s body from the building on a gurney. Her face and body are covered by a towel.

Zhao Zhao, the victim of a hammer attack, being wheeled out of her Brooklyn apartment building on a gurney.

A few minutes earlier, police had chased after Ye, who was spotted running from the building in a bloodstained tank top, Frank said.

Video from another neighbor showed cops handcuffing Ye down the block from the building.

“It is really very sad. This neighborhood; usually it’s very quiet. We have no problems, everybody lives here in harmony,” Frank said. She recalled seeing the kids just a few days ago, playing outside their building.

Police said the children were stabilized overnight at NYU Langone Hospital Brooklyn and then transported to the pediatric unit at Bellevue Hospital, where they remain in critical condition.

Their father, who neighbors said lives out of state and visits occasionally, was expected to arrive in New York City sometime on Thursday afternoon. A third tenant who lived in the condo was not immediately identified.

Ye was charged with murder, two counts of attempted murder, assault and criminal possession of a weapon.

He kept his head down and did not speak at all as police led him from the 72nd Precinct stationhouse in Sunset Park just after noon on Thursday. His hands were cuffed, his feet were in shackles and he wore a white Tyvek suit.

Ye was expected to be arraigned sometime on Thursday afternoon in Brooklyn Criminal Court.