A fire has broken out at a CBD university overnight, resulting in a chemical spill and the closure of an entire city street.

Victoria Police spokeswoman Melissa Seach said police had blocked off Franklin Street, between Swanston and Victoria streets, while the Metropolitan Fire Brigade investigated the spill.

MFB spokeswoman Heather Stockton said crews were called to Building 10 at RMIT University just before 2am on Sunday and found a cabinet containing unknown and dangerous chemicals on fire.

The MFB was accompanied by specialist hazardous materials trucks, a scientific officer and RMIT experts to advise crews on the chemicals.

Although the fire was quickly controlled, the MFB and police remain cautious about any potential chemical spillage and dangerous residue lingering in the air.

While police control traffic in the area, firefighters will be removing the chemicals until late Sunday morning.

An MFB spokesman said there was no danger to the wider community, and that the fire and the spill were ‘‘very much confined to the university’’.