A large apartment fire on the Jersey Shore displaced a dozen residents and sent a police officer to the hospital early Saturday morning, authorities said.

Around 5 a.m., Galloway police responded to the fire on Apache Court, where officers noticed “a building with dozens of apartments fully engulfed,” Galloway police said in a statement.

One officer was hospitalized at AtlantiCare Mainland for smoke inhalation after patrols went floor by floor through the burning building in an attempt to evacuate all residents, police said. Several residents were also treated for smoke inhalation by Galloway Township EMS.

The fire was brought under control and extinguished as soon as fire brigade units arrived at the scene, police added.

A total of 18 units in the apartment complex were relocated; officials were still examining the wreckage to determine if all passengers had escaped safely as of Saturday afternoon, police said.

The cause of the fire is still being investigated. Apache Court is currently closed as the investigation continues.