A fire on the second floor of University College (UniCol) in Dunedin has been extinguished this evening.

A fire and emergency New Zealand (Fenz) spokesman said two alarms were set off in the south tower shortly before 7pm.

The fire caused the student accommodation complex, which houses about 500 people, to be evacuated.

Five crews from around Dunedin attended the fire.

Sprinklers installed in the building were set off and extinguished the fire before it could spread further.

Three crews were still on scene at 8pm, dampening down hot spots.

It was unclear at this stage what caused the fire.