More than 30 firefighters tackled a blaze in a science building at the University of St Andrews in Fife.
They were alerted to a fire involving suspected hazardous materials shortly before 17:00 on Sunday.
Images posted on social media showed flames and smoke rising into the air from the four-storey building.
The fire service said the building was evacuated and there were no casualties. Shortly before 23:00, they said the fire had been extinguished.
At its height, eight fire engines including a height appliance were involved in the operation.
In a statement issued late on Sunday, the fire service added: “Crews currently remain on the scene and are expected to remain so for some time as they work to make the area safe and extinguish any remaining hotspots.”
The university described the fire in its biomedical sciences building in North Haugh as “serious”.
It is shared by the university’s schools of chemistry and biology.
About 100 staff and postgraduate students work in its labs, where medically-focused research in organic and synthetic chemistry, virology and microbiology is carried out.