AMSTERDAM (JTA) — Livraria Ets Haim is the world’s oldest functioning Jewish library. As such, it is no stranger to the prospect of imminent destruction.

Founded in 1616 by Jews who fled Catholic persecution in Spain and Portugal, the three-room library is adjacent to Amsterdam’s majestic Portuguese Synagogue in the Dutch capital’s center.

The 30,000-volume collection mostly contains manuscripts written by people who fled the Inquisition on the Iberian Peninsula or their descendants. The oldest document is a copy of the Mishneh Torah, the code of Jewish religious law authored by Rabbi Moshe ben Maimon, or Maimonides, that dates to 1282. Ets Haim’s volume is pristine but for the scars left behind by an Inquisition censor, a Jew who had converted to Christianity and singed away entire passages of the book.

Ets Haim as a whole faced a similar fate — or worse — in 1940, when the Nazis invaded the Netherlands and had 75 percent of its Jews murdered. Yet the Nazis left the Portuguese Synagogue intact, and instead of burning the library’s collection, they shipped the books to Germany. The collection was discovered there, with light damage, after the war.

After the war, the books were returned to Amsterdam. But the Dutch Jewish community lacked the resources to preserve the collection. Library curators determined that the Ets Haim building would need to be renovated thoroughly to ensure the proper conditions, so in 1979 the books were sent to Israel.

Following extensive renovations to the building, which dates to 1675, the collection returned home in 2000. And now, relying upon 21st-century technology, its custodians are determined to make the library’s works accessible to interested parties around the world. The aim, according to Ets Haim’s curator, Heide Warncke, is to ensure that the knowledge stored between its pages is never lost again.

In 2014, using advanced imaging equipment, the National Library of Israel has partnered with Ets Haim to digitize its entire catalog. And now the partners will make everything available online — and for free.

The Jerusalem library will include Ets Haim’s books in Ktiv, a vast international collection of digitized Hebrew manuscripts that is set to launch in August. The scans — from centuries-old stores like Ets Haim’s — are ultra high-resolution files that are resistant to digital decay. For added security, they are stored on several servers worldwide.

“Like many Holocaust survivors have in their lives, the books of Ets Haim have demonstrated a remarkable ability to cheat death,” said Aviad Stollman, head of collections at the National Library of Israel. “But we still need to do our part to ensure this exquisite Jewish library is preserved for centuries to come.”

The library is housed in a two-story wooden building with a steep, spiral staircase and two octagonal sky windows that provide diffused light. It is open to the public only a handful of times each year during guided tours that typically need to be booked in advance. (Accredited scholars may access the library year-round.)

Warncke said the restrictive policy is meant to protect the books, which are at risk of being damaged by humidity and changes in temperature.

The Ets Haim collection, which in 2003 was added to UNESCO’s list of World Heritage items, owes its richness to its genesis from Iberian Jews, she added.

These Jewish immigrants were pioneers in philosophy, innovation, trade and medicine, she said. When they fled the Inquisition, they brought knowledge to the Netherlands on theology, astronomy (as evidenced in Ets Haim’s Hebrew-language book from the 17th century titled “Collection of Astronomical Treatises”) and medicine.

One decidedly modern volume, the “Dictionary of Maritime Terms,” was published in 1780 by the translator David Franco Mendes in Amsterdam, offering entries in Dutch, French, Portuguese and Spanish alongside fine sketches of ship parts. Though his book is secular in essence, Mendes was a prominent member of the Jewish congregation as well as an insurance broker.

Other Sephardic Jews used the relative tolerance they encountered in the Netherlands to resume the study of Jewish texts that had been largely stunted throughout Europe following the Inquisition.

“The people who founded Ets Haim and helped it grow had been living under persecution for decades,” said Ruth Peeters, a senior cataloger at the library. “You can see in the books their enthusiasm about being able to reconnect with their Jewish traditions openly and resume the study of it. Ets Haim is a testament to the cultural revival they led.”

At times, this enthusiasm for theological debate tested the borders of acceptability even in the Netherlands, which despite being a relatively tolerant nation was also a deeply religious Christian one. One such publication was the benignly titled book “Selected Works by Various Authors.” Written in Spanish in the 17th century by Saul Levi Mortera, it contains “refutation of the gospels, acts, epistles” according to Ets Haim, and “arguments against Christianity,” according to the Israeli library.

Such explosive publications were kept at Ets Haim as manuscripts and were printed rarely, Warncke said, so as to limit their distribution and avoid angering Dutch society.

This culture of debate among the Jewish community, as well as its exposure to different religions and ideas that an international trading hub provided, produced heretics like the philosophers Baruch Spinoza — who was excommunicated by Jews for his atheist musings, possibly because they also offended Christians — and Uriel da Costa.

There is no way of knowing for sure, but both men (who died in 1632 and 1640, respectively) may well have frequented Ets Haim to conduct their research, Warncke said.

“It was, after all, the largest collection around of Jewish writings,” she said.

And while there is no record of Spinoza’s activity at the library, his father had enrolled him in the Ets Haim seminary, which was Amsterdam’s first Portuguese Jewish seminary, of which the library was a part.

Another controversial figure did leave an indelible mark on the library: Shabbetai Zevi, the Turkey-born Jewish eccentric who divided the Jewish world with his claim that he was the Messiah. Under duress, he converted to Islam in 1666.

One of Ets Haim’s most remarkable documents is a letter sent that year to Zevi by 24 Dutch Jews who left the community over their support for Zevi’s messianic claim. In the three-page Hebrew-language document, they ask for word from their messiah and recount the story of Shabtai Raphael, who was banned from the city over his support for Shabbetai Zevi. The letter never reached the self-proclaimed messiah, probably because he had already converted to Islam when the envoy sent with it reached the Ottoman Empire.

Whereas these documents are well researched, new discoveries are always being made, said Warncke. As an example, she cited a 15th-century author’s dedication to his wife – a rare tribute for a woman that reflected the progressive nature of Dutch Jewry at the time.

Digitization, she said, is “one of the possibilities to make our manuscripts accessible to a bigger audience. That can lead to more knowledge. There are many secrets still to be unlocked.”