An early morning house fire in Oak Bluffs destroyed an accessory apartment but all the building occupants escaped without injury, the town fire chief confirmed.

Oak Bluffs fire chief John Rose said firefighters were called out to 24 Shawmut avenue at 5:40 a.m. Saturday. When they arrived, an attached apartment to a two-story garage apartment was fully involved, the chief said. The occupant of the apartment and three occupants of a second story apartment all got out safely with no injuries, the chief said.

He said it took about 45 minutes to get the fire under control, and firefighters were able to stop the fire from spreading to the second story apartment.

The accessory apartment was a total loss and some vehicles stored in the garage were damaged as well, Chief Rose said.

Oak Bluffs had a full department and EMS response, and Edgartown and Tisbury sent engines as part of standard mutual aid protocol, the chief said.

The property is owned by Bill Bernard and occupied by renters, the chief said.

The cause of the fire is under investigation, but Chief Rose said he believes it started from a space heater that caught a mattress on fire.

He praised the quick response.

“It was a great response from all the departments . . . it could have been much worse; there are a lot of houses in that area,” the chief said.