A panic alarm sent Johnson City police to a Grand Avenue residence, where they encountered a man allegedly brandishing two knives.

Police said a woman who lives at the residence alerted an alarm company dispatcher that her boyfriend had beat her up by punching her in the face several times. When officers arrived, she opened the door only a crack, while still holding her infant.

Behind her, police said, was Zaid Rahman, 23, who was holding a knife in each hand.

One officer wedged his foot in the door so nobody could shut it. Police said they were able to get the woman and her child out of the apartment.

Rahman allegedly stepped forward, still holding the knives, then ran into another room. Police said they were able to get him to drop the knives and come out.

Rahman was charged with a felony count of menacing a police officer and a second-degree harassment violation, then sent to the Broome County jail. Additional charges are pending, police said.