Around 25,000 rare books and newspapers, many dating from the 17th century, could be damaged by moisture after rain flooded the basement of the Costa Rican National Library in San Jose.
No items suffered water damage in the flooding, according to a National Library statement.
But experts have warned that high moisture levels in the building could harm the library's rare books collection.
The cause of the flooding is unknown, but officials say it may have resulted from a clogged pipe or a nearby public works.
Aside from the rare books, around 6,300 works in the Costa Rican Art Museum also escaped damage.
This is the first time that the National Library has been affected by flooding,
Experts were working to determine what caused the water to enter the building and to prevent it from happening again, said Elena Carballo, Culture Minister.
The Costa Rican National Library's rare book collection numbers nearly 700,000 including newspapers, magazines and audiovisual materials. It opened in 1890.