The National Library of Scotland is in Edinburgh
Staff are embarking on a clear-up operation after the National Library of Scotland in Edinburgh was flooded for the second time in two years.
Water cascaded through the building, which holds about 14 million items, after a pipe burst on the 12th floor.
Lothian and Borders Fire and Rescue crews, together with library staff, worked to divert the water into the basement, and it was then pumped out.
A library spokesman said there appeared to be "very minor damage".
Library employees battled to save valuable manuscripts as water flooded downwards.
The fire service was called to the country's legal deposit library on George IV Bridge just after 1800 GMT and the water supply was cut off within 10 minutes.
Some 15 firefighters worked to clear the building with three pumps.
In September 2007 a fault in a sprinkler system flooded five floors of the library during refurbishment.
A Lothian and Borders Fire and Rescue Service spokeswoman said: "A large volume of water had cascaded into the building.
"The fire service and library staff directed most of the water into the basement and that was then pumped out of the premises."
No other buildings in the area were understood to have been evacuated and no-one was thought to have been injured, she added.