In an effort to preserve centuries of the written word from possible pillage by Islamic State militants, the Baghdad National Library is rushing to scan ancient works to create digital archives.

The work undertaken by the microfilm department is truly a hefty task, as a vast proportion of the collection of manuscripts is in bad shape. Over the centuries, several have either been burned or ruined by dampness. Others have even fossilized over time and now look like large rocks.

“Those are the most difficult books to restore,” Fatma Khudair, from the museum restoration department told AP. “We apply steam using a specialized tool to try to loosen and separate the pages.”

Khudair noted that some damage over the years is “irreversible.” Currently the library staff is working to preserve the documents dating back to the Ottoman empire.

مكتبة بغداد الوطنية تسعى لرقمنة الوثائق والمخطوطات النادرة http://t.co/mVc3ZtMu75pic.twitter.com/UQudpfTxPZ — المكتبة الرقمية SDL (@SDL_sa) August 4, 2015

Preservation process is long and tedious. Specialists first sterilize manuscripts for 48 hours. Then, page by page restorers use Japanese tissue paper to fill in torn edges or to apply an extra layer of protection to make the paper more durable.

READ MORE: ​ISIS fighters plant mines and bombs in Palmyra - monitor

“Once restoration for some of the older documents from the Ottoman era, 200 to 250 years ago, is completed, we will begin to photograph those onto microfilm,” said Mazin Ibrahim Ismail, the head of the microfilm department.

The need to preserve the old books first became apparent in April of 2003, after the US led-invasion of the country, when the National Library and Archives were burned and looted. More than 25 percent of its books and some 60 percent of its archives were lost. Before the destruction, the collection held 417,000 books, 2,618 periodicals dating from the late Ottoman era to modern times, and a collection of 4,412 rare books and manuscripts.

خبر جميل:مكتبة بغداد الوطنية تستعد لحفظ ارشيفها رقميا في ظل تهديدات داعش. http://t.co/qvjYLoFgCw #العراقpic.twitter.com/k9grbrFTIb — Ahmed Alawami (@Al3wami) August 4, 2015

During the invasion of Iraq, “we had an alternative site for the most important books and documents at the Department of Tourism,” said Jamal Abdel-Majeed Abdulkareem, acting director of Baghdad libraries and archives. “Then books and the important documents were exposed to water because the American tanks destroyed the water pipes and water leaked onto these important cultural materials.”

READ MORE: ISIS militants destroy ancient statues, relics in Iraq (VIDEO)

However, assessing current threats to the collection, library officials have stressed that the Islamic State’s (IS, formerly ISIS/ISIL) hardline ideology is by far the biggest contemporary challenge posed to rare manuscripts.

The militants “want history to reflect their own views instead of the way it actually happened,” Abdulkareem said.

One way to combat ISIS is not only to preserve the books but share the knowledge contained inside them with people who have recently suffered from a jihadist occupation. This year the Baghdad library donated some 2,500 books to branches in Iraq’s Diyala province after Iraqi forces took back the territory from Islamic State militants.

“So when an area is liberated, we send them books to replenish whatever was stolen or destroyed, but also, so that Iraqis in this area have access to these materials so they can always feel proud of their rich history,” Abdulkareem said.

Islamic State fighters take pride in publicly destroying artifacts on the territory they control in Syria and Iraq.

Sledgehammering statues stolen from the ancient Syrian city of Palmyra was by far the most talked about cultural tragedy this year. Demolishing a 13th-century tomb near the northern Iraqi city of Kirkuk also made headlines.

Disregarding all the international pleas to spare the ancient treasures, IS continues to regard antiquities as sacrilegious remnants of the past that deserve to be wiped off the face of the Earth. The destruction drive is always accompanied by propaganda videos and photos, as seen by the wreckage of a museum in Mosul, Iraq, and the destruction of archaeological sites in Nimrud, Hatra and Nineveh, Iraq.

At the start of the year, IS burned down the Mosul public library which had been home to over 8,000 rare books and manuscripts. The UN has called the event “one of the most devastating acts of destruction of library collections in human history.”

The “destruction marks a new phase in the cultural cleansing perpetrated in regions controlled by armed extremists in Iraq. It adds to the systematic destruction of heritage and the persecution of minorities that seeks to wipe out the cultural diversity that is the soul of the Iraqi people,” UNESCO's Director general Irina Bokova said at the time.