TAMPA, Fla. (WFLA) — A teenager who was dangling off a bridge over train tracks in Queens, New York was rescued by police and Good Samaritans.

On Oct. 19, two officers with the New York Police Department and a construction worker pulled the teen to safety after he was hanging on the side of the overpass.

Crews had to reach over a railing and pull him up over a wall.

According to NBC New York, the teen climbed over the wall to get a closer look at the trains and got stuck.

Witnesses held the legs of one of the officers as he helped rescue the teen, according to local media.

“Great work by Officers Ksepka and Czerniawski saving a teenager from falling off the side of the sunnyside bridge,” an NYPD officer wrote on their Twitter.