Police have arrested a homeless man they say attacked a woman and her young daughter in their Bronx apartment Wednesday night.

Christian Valdez, 28, allegedly forced his way inside the building located at 563 Caldwell Avenue in Woodstock around 7:30 p.m.

The woman tried to leave with her 3-year-old daughter on the fire escape.

But investigators say Valdez followed them, then hit the woman with a glass bottle and grabbed the girl, cutting her elbow in the process.

That's when they say he threatened to throw her over the railing.

Witnesses told us he went so far as to dangle her off the side.

Two good samaritans were able to wrestle the girl away from Valdez to safety.

"I ran upstairs and I came they were already right here on the second fire escape. So I came and I grabbed the lamp or whatever was there and told him let her go, let her go. He saw me with the lamp and he got nervous. I went like that, somebody else grabbed the baby, and he tried to leave. He's like this is none of your business. But I said no, he wanted to leave, and I said no you're not leaving until the cops come," said the witness.

Valdez was taken into custody at the scene.

He faces multiple charges, including assault and burglary.

Police say he knew the victims.

They were taken to the hospital and are expected to recover.