Three occupants were also evacuated from the adjoining basement-level flat in Park St, North Dunedin.
One of the students was in the shower at the time. Her flatmate alerted her and firefighters after seeing the fuse box on fire.
''I was coming around the corner in the hallway, [flatmate] Clare [McInerney-Heather] was in the shower, and I just saw the fuse box was crackling and smoking, so I was like 'Oh my God, Clare' and yelled at her to get out,'' Emily Rhoades said.
''There were flames coming out of it.
''We got out straight away.''
Firefighters were alerted about 9.15am.
''When we were waiting on the street the flames got larger and there was smoke everywhere,'' Miss Rhoades said.
Four appliances attended the blaze which spread into the building's roof cavity, station officer Justin Wafer said.
''The burn patterns indicate fire has started in the switchboard on the wall which spread into the ceiling cavity,'' he said.
''By the time we arrived there was a large amount of smoke in the building and we could hear smoke alarms.
''All the occupants were evacuated from the property and the firefighters commenced the fire attack.''
The two students were unsure of the extent of the damage to their property yesterday morning.
Two other flatmates were away at the time, having returned to their hometowns following first semester exams.
A fire investigator would not be required at the scene, a Fire Service spokesman said.