What is the role of a library in today’s digital age?

This is a question that communities across the country are asking, and it seems that the very concept of the library — a physical space for the storage and consultation of books — is under threat. But libraries have endured for centuries because each generation has reshaped the library in its own image, with new intellectual agendas and new buildings that reflect the priorities of the community and the day. As libraries today embrace redesigns, making room for computers, meeting spaces, culinary learning centers and coffee shops to serve their patrons, they are following in a long tradition of adaptation, from the first medieval libraries that chained their books when visitors surged, to 19th-century libraries that had to make new space for women and children.

Libraries, far from stable institutions, frequently underwent radical change. They began thousands of years ago as storehouses of information for the powerful — emperors, princes and administrators. Rulers recognized that knowledge was power, and had little to gain by granting access to their collections to a broad public.

But then the growth of literature in the ancient Greece transformed personal archives into places of learning, and indeed of recreation. Yet the connection between libraries and power never disappeared. For much of human history, collecting a large number of books was a privilege of the elite, the wealthiest members of society or powerful institutions like monasteries.

Because libraries reflected the values of existing elites, swings in intellectual taste or political upheaval could put them at risk. All the great libraries of the Roman Empire, many established to celebrate the achievements of emperors or victorious generals, disappeared when Rome fell. Most of the papyrus scrolls from these libraries were lost, but some were saved by Christian monks who copied them by hand onto parchment. For much of the millennium between A.D. 400 and 1400, Christian monasteries were held in high regard as centers of prayer and learning, not least because of the important role played by monks in copying and preserving books.

This changed during the Renaissance in the 14th and 15th centuries — an intellectual movement that sought to transform society by returning to the classical values of the Roman Empire — as Italian book hunters terrorized monastic libraries by stealing their Roman and Greek manuscripts. They despised the monks for making so little use of their favored classical writers, who the Renaissance book hunters wished to restore to former glories at the Italian courts and universities. Many of the great monastic libraries, now mostly containing Christian books, became less popular since they didn’t reflect new Renaissance values or project modernity. As the modernizers of the Renaissance founded their own beautiful book collections, they left these neglected libraries, now picked over and increasingly irrelevant, in their wake.

Religious upheaval was also a disruptive force for libraries. Martin Luther’s Protestant Reformation resulted in the destruction and dispersal of hundreds of libraries throughout Northern Europe in the 16th and 17th centuries, as church and academic libraries were cleansed of Catholic works. The library of Oxford University was entirely ransacked, leaving the university to sell off the furniture, because there were no more books left in the building.

Elsewhere in Protestant Europe, Catholic collections were seized and appropriated for what ultimately became the first generation of public libraries. While the notion of saving Catholic books rather than burning or destroying them was a noble idea, in practice this resulted in a patchwork of city libraries which were rarely used, as they mostly contained aging books that few people had any interest in reading. In one Dutch town, the city library was so poorly frequented that one visitor had to have his clothes washed after visiting, because of the dust.

A similar tale unfolded in Austria, between 1782 and 1787, when 700 monasteries were dissolved as part of the Enlightenment agenda of Emperor Joseph II. Their rich book collections were made available to university and school libraries, but these institutions hardly had the staff to perform an adequate inspection. And so, imperial administrators auctioned off books deemed to be insignificant, including many items from the first age of printing that we would now consider to be priceless. What the modernizers considered to be useless prayer books were simply pulped. Tens of thousands of rare books were lost, and many others were left to rot.

During the French Revolution, revolutionary soldiers ripped up thousands of books from libraries to make cartridges for their firearms. The revolutionary government instructed them to use books from libraries of aristocratic exiles, as well as those that belonged to churches and universities, which were privileged institutions. All books that spoke against the principles of the Revolution were of no use in the new age of liberty. Perhaps 12 million books were lost, until newly established French municipal libraries salvaged the remains of France’s rich literary heritage.

Such library purges continued during the great ideological conflicts of the 20th century. The Nazis transformed the public library system in Germany, building almost 4,000 new libraries between 1934 and 1940. The regime closely monitored the content of these libraries, however, and largely supplied them with books that advanced the ideologies of the Nazi party. Socialist, liberal or what was deemed “asphalt” literature that was seen to attack Nazi principles was removed, or, more famously, publicly burned.

After World War II, the Allied Powers occupying Germany were faced with the challenge of de-Nazifying the country’s public libraries. Rather than burning the pro-Nazi books, they mostly quietly removed and then pulped the offending volumes. In many cases, the process was supervised by the same librarians who had removed non-Nazi books in the 1930s.

Soviet occupiers pulped more than 27 million volumes of anti-communist literature in Czech libraries after World War II. Forty years later, the collapse of the Soviet Union led to similar scenes of book cleansing: In one town in the former East Germany, the contents of the public library were simply placed on the street for passersby to pick up. The entire library world of the Soviet era — of schools, universities, public library networks — was in one fell swoop rendered obsolete.

In short, libraries, as symbols of power, have always been under threat when that power was contested or vanquished. And yet, despite all the threats faced by libraries, people have continued to collect books and documents to shape and preserve our collective body of knowledge — and they will continue to do so. Today we can enumerate 2.6 million libraries around the world, including 400,000 public libraries. The library, as a concept, will continue to evolve, balancing the needs of communities with their roles as keepers of knowledge reflecting the society’s values. It is in that harmonious dialogue that the future of the library can be found.