More than 500 students and teacher’s have been evacuated from a Melbourne university as a result of a smell initially thought to be gas.

However the smell that had spread throughout RMIT’s library was in fact a rotten durian, a tropical fruit known for its strong stinky smell, that had been left in a cupboard.

The building has now been reopened, Melbourne's Metropolitan Fire Brigade said in a statement.