(NEW YORK) — A jewelry store customer was trapped in a locked Diamond District safe room for about 10 hours overnight — only freed when the doors, on a timer, popped open.

The 23-year-old man became locked inside the secure room inside 580 Fifth Avenue, which houses multiple small jewelry stores and vaults, just after 8 p.m. Tuesday, New York Fire Department officials said.

He was checking his safety deposit box when the door to the room was locked from the outside — trapping him in a 20-by-40-foot space.

The room was set on a timelock, not scheduled to reopen until start of business the next morning.

Firefighters responded and cut through about 30 inches of concrete wall to free the man. But after about 10 hours of rescue work, they reached metal plating, which would have required torches to cut through.

Not wanting to unnecessarily spew smoke and fumes into the small space, firefighters decided to wait for the door to automatically open.

It automatically unlocked at about 6:15 a.m., freeing the man.

He is being evaluated, but appears to be physically OK, officials said.

Firefighters said the secure room “was closed by the people that own the vault. Once the door is closed after 7 p.m. it locks automatically. It’s on a timer mechanism. It does not reopen until a certain time passes.”

They were talking to the man on the phone the entire time and had surveillance video showing him walking in.

Copyright © 2023, ABC Audio. All rights reserved.