A major blaze in a science building at the University of St Andrews began accidentally, police believe.

More than 30 firefighters were involved in extinguishing the blaze at the biomedical sciences building after they were alerted to an incident involving suspected hazardous materials just before 5pm on Sunday.

The building on the North Haugh in the Fife town was evacuated and there were no casualties.

Police Scotland and fire crews have established the blaze was accidental, the force confirmed on Monday.

In an update, police in Fife tweeted: “Thankfully, no one was injured and students, staff and locals are thanked for their co-operation with emergency services.

“No further police action is required & the matter has been referred to the university.”

Built in the late 1990s, the building is shared by the university’s schools of chemistry and biology.

According to the university, the four-storey structure is known as a centre of excellence, addressing issues such as antibiotic resistance and infectious disease.

In a letter to staff and students on Monday, university principal Sally Mapstone said there is likely to be extensive water and smoke damage to other areas of the building not directly hit by the fire.

“I know that it is this aspect of the fire which has caused particular distress to colleagues who work in BMS (biomedical science),” she wrote.

“The lower floors house specialist fridges and liquid nitrogen containers in which are kept cell lines and other critical research materials, in some cases the key to lifetimes’ work.

“The profound concern this incident has caused was evident to me from the many conversations I had with colleagues from chemistry and biology whom I met at the scene last night.”

North East Fife MSP Willie Rennie has held discussions with the university to offer his support.

Mr Rennie, leader of the Scottish Liberal Democrats, said: “The chemistry and biology departments which use this building are involved in incredibly important research. It’s tragic that for some researchers, their life’s work may have been wiped away by the fire and water.

“I would like to extend my thanks to firefighters who worked incredibly hard to get the blaze under control as well as all of the universities across the country who have been in touch to offer support to researchers and staff.

“The challenge in the crucial first hours after the building has been made safe will be to access the biological samples that have a limited life out of the controlled storage. We will not fully understand the scale of the loss and impact on careers and research until this assessment has been done.”

The university said that the clean-up operation is its current priority.

In a post on Facebook, it said: “The university has been inundated with offers of help and support from far and wide, many thanks to everyone that has reached out in this difficult time.”