A New Jersey police officer caught a 1-month-old baby after a man threw the child from a building’s second floor balcony, authorities said Saturday.

The newborn, who was not identified, wasn’t physically harmed, Jersey City Mayor Steven Fulop said.

In an Instagram post, Fulop thanked the officer, Eduardo Matute, and published a photo of him holding the baby.

The incident began Saturday morning in Jersey City, with a report of an unidentified man “dangling” the newborn over a balcony, a Jersey City spokeswoman told NJ Advance Media.

Officers negotiated with the man and set up a perimeter, Fulop said. The man was arrested after he threw the baby, NJ Advance Media reported.

It wasn’t immediately clear what charges he faces. Other details about the incident weren’t available.

“Kudos to the JCPD and all the officers involved for their heroics and for bringing a safe conclusion to this dangerous situation,” the Hudson County Prosecutor’s Office said in a statement.