In the Middle Ages, Bergen and Trondheim were the main centres of literature in Norway, monasteries and churches containing the majority of books and libraries.
St Mary's Church in Bergen possessed a large book collection that was open to the public.
In 1766, vicar David Schønfeldt donated a large amount of books and money to the collection, allowing the church to construct a separate building to contain the library.
This building would soon prove itself too small, however, and the library moved to the meat bazar, located along the inner harbour of the bay of Vågen.
In 1910, Arne Kildal became chief librarian, and continued the effort to provide the library with its own, modern building.