NEW YORK (CBSNewYork) — A young Brooklyn boy is in stable condition after getting stuck in a roll-up gate.

It happened around 6 p.m. Thursday on Skillman Street in Williamsburg. The boy, who is about 6 or 7 years old, somehow got his arm and head tangled in a metal roll-up gate.

READ MORE: New York State To Adopt New CDC Guidelines For Vaccinated People Starting This Wednesday, Cuomo Says

A panicked crowd watched as firefighters worked to free the little boy, climbing onto an SUV to get as close to him as possible.

“He was crying,” one witness said.

“His hands were inside,” said a woman at the scene. “I saw his mouth was moving, his lips, and I saw his feet were moving, so I think he was conscious.”

Crews tried stretching the metal with different tools, but in the end, firefighters used an air bag to stretch the metal and free the boy. Witnesses said it took at least 15 minutes.

“The airbags inflate and it allows the metal to expand, which released his head,” said FDNY Lt. Gordon Ambelas.

Investigators said the boy was probably trying to ride the gate as it rolled up. He was taken to the hospital with minor injuries.

READ MORE: Illegal Motorbike Riders Strike Again, This Time Attack 76-Year-Old Man In Inwood Park

The gate is now turned off, but when it is on, a combination on a keypad is needed to open it. The gate also has a safety sensor.

CBS 2’s Weijia Jiang spoke with three businesses that install gates, including the company that put in the gate from Thursday’s incident, and they say sensors only detect objects when the gate is going down, not going up.

“They need to do more security, secure it better,” said witness Chaya Kohn. “I warned my kids. I told them never to touch such a thing, don’t go near it.”

Thursday’s incident wasn’t the first time a child has been caught in a roll-up gate.

In May 2012, 12-year-old Yakim McDaniels was killed after playing a game of chicken on an automatic gate. He was supposed to jump off the gate as it rolled up, but he got caught and was crushed.

Meanwhile, the little boy is expected to make a full recovery and is set to be released from the hospital later Friday.

MORE NEWS: Human Resources Commissioner Steven Banks Talks To CBS2 About NYC's Plan To Get Homeless Off Subways

Check Out These Other Stories From CBSNewYork.com:
[display-posts category=”news” wrapper=”ul” posts_per_page=”4″]