A teenager has been freed after spending more than three hours in the vault of an abandoned bank in Florida.

Firefighters in Hollywood tried to drill through a wall to break into the vault after the 17-year-old’s friend called emergency services, news outlets reported.

But they were stymied until a staff member at the bank’s new branch across the street heard of the predicament.

The worker remembered the code and was able to open the vault’s massive door.

The two teenagers were exploring the vacant Bank of America building when one of them got stuck, officials said.

Luckily, the other was on the outside and able to call for help.

The teenagers’ parents were called and authorities released the boys to them.