Firefighters battled a blaze at a student accommodation complex in central Wellington early this morning.

Twelve appliances were called to the fire at the Dixon St building at 4.20am.

Shift manager Jan Wills said when officers arrived the whole building was smoke-logged but luckily no one was injured.

It could have been a different story had it not been for the building's fire alarm which alerted Wellington Fire.