MICHEL MARTIN, HOST:

If you've heard of Timbuktu, you might think of it as a destination for adventurers, a place of dreams. Located in Mali on the southern edge of the Sahara Desert, in fact, the city served for centuries as an Islamic cultural and intellectual Mecca, where, despite occupations and invasions, people preserved and restored priceless texts dating to the Middle Ages. Then came 2012, when radical Muslims linked to al-Qaida invaded.

They didn't see these texts as part of their heritage but rather as contradicting their interpretation of Islam. Elsewhere, they were destroying beloved cultural icons. Librarians feared the city's prized manuscripts would be next. Enter Abdel Kader Haidara. He oversaw a secret plot to smuggle out more than 300,000 manuscripts. It's a remarkable story captured by the new book out this month. The title is a little salty but fitting the subject. It's called "The Bad-Ass Librarians Of Timbuktu." I spoke with author Joshua Hammer, a former Newsweek bureau chief and editor to Smithsonian Magazine. And I started by asking him why these texts were so highly prized.

JOSHUA HAMMER: Well, these volumes - and we're talking about hundreds of thousands of them - at the point in which al-Qaida invaded Timbuktu, there were something like 370,000 manuscripts amassed in libraries in Timbuktu. And they portrayed Islam, as practiced in this corner of the world, as a blend of the secular and the religious, or they show that the two could co-exist beautifully. And they did in this city. So it was tremendously important for Haidara and those who supported him to protect and preserve these manuscripts as evidence of both Mali's former greatness and the tolerance that that form of Islam encouraged.

MARTIN: Well, tell me then again - and Abdel Kader Haidara, what was his role in all of this? Well, tell me just - first of all, tell us who he is.

HAMMER: Abdel Kader Haidara was a son of a scholar, and he grew up in an intellectual environment in Timbuktu. He was not a wealthy person. After his father's death in the early 1980s, he inherited the family's centuries-old manuscript collection. So in 1984, the head of the Ahmed Baba Institute, the government-owned library in Timbuktu, called on Haidara and said hey, we're having trouble getting off the ground. We need to find manuscripts. We know they're out there. They're hidden away in the desert on river towns. Can you undertake this job of traveling around northern Mali, tracking down these manuscripts that have been lost, buried, disappeared over generations? Gather them up, we'll give you money.

And we want this library to be splendid. We want this to be something that people from all around the world will come to visit. He was reluctant at first, but the call of duty and the curator's constant pressure prevailed. And in 1984, he began this - what turned into a 12-year really amazing quest to ferret out these manuscripts all across Mali.

MARTIN: So then he did that and persuaded families to part with these treasured items. And then another chapter, not such a happy one...

HAMMER: Another chapter - another chapter, not such a happy one. In 2011, the Arab Spring breaks out - Gadhafi's downfall, the arsenals of Libya and the chaos of Gadhafi's murder and the disintegration of the Libyan state are opened for the taking. Then you've got these various rebel groups in Mali. You've got Islamic radicals all descending on Libya on these arsenals, walking in, loading up their pickup trucks with heavy weaponry, driving through the dust across the desert back to Mali. And so these heavily-armed rebels sweep across the desert and in three months have captured two-thirds of the country.

MARTIN: So tell us a bit about what was the atmosphere in Timbuktu. Tell me why did Abdel Kader Haidara decide to do what he did.

HAMMER: Yeah, well, the first thing that Abdel Kader was worried about frankly was looting. In the first few days after the rebels took over Timbuktu and the army and the police had fled, there was total disorder. That's when he kind of began to scheme - hey, you know, our - the great treasures of Timbuktu are being held in these very ostentatious libraries. He said these are going to be targets. The looting subsided pretty quickly.

But as it subsided you had this growing radicalism. You had Islamic police stopping people, throwing them in jail, grabbing cigarettes out of their mouths, whipping them in public. He just foresaw that this was going to get worse and that sooner or later, these manuscripts were going to be held hostage. They're going to become political tools. They could be destroyed in an act of vengeance, caught up in military action. We've got to protect them.

So that's when Abdel Kader and a small group of his supporters, friends, relatives got together and began what ended up being a three-stage effort to protect and essentially smuggle to safety all of these manuscripts.

MARTIN: So tell us a little bit if you would how they did it I know it's kind of hard for me to describe to people with a story of, you know, librarians at the center of it. But it really is kind of a heart-pounding experience

HAMMER: Let's remember that Abdel Kader was more than a librarian. This guy had spent 12 years as a bad-[expletive] explorer, as an adventurer. He was traveling on camels across the Sahara, on riverboats, going to small villages, finding these manuscripts. So he was an operator. So when the time came, he just knew what to do.

He said the first thing we're going to do is get them out of these big libraries. We're going to take trunks. We're going to packed them into trunks at night when the rebels are asleep, and then we're going to move them in the dead of night by mule cart to these various houses - safe houses scattered around the city. And hopefully they'll be safe for the duration of this occupation.

MARTIN: What would you say is the importance of this? What would you want people to think about when they think about this story?

HAMMER: One of the things I think is important to draw from it is to realize that there is this whole strain of Islam that is moderate, that celebrates intellectuality, that celebrates culture, that celebrates diversity, secular ideas, poetry, love, human beauty. I think that is lost in this debate that's going on. But I think in fact that the Islam as represented by those in Timbuktu and the bad-[expletive] librarians is in fact more representative of what Islam is.

MARTIN: Where are these texts now? Where are these manuscripts now, and is there an opportunity to have them be safeguarded from another spasm of violence like this?

HAMMER: He hopes that they'll be able - that he'll be able to return them to Timbuktu. They're in about a dozen climate-controlled storage rooms in Bamako, the capital of Mali. And as far as moving them back, he's waiting. I mean, these are very hard people to root out. But I mean, Timbuktu is a ghost town. Tourists aren't going there. There aren't - flights aren't going there. It's very sad, and I don't know and he doesn't know when - if those glory days can ever be recaptured given the strength of the Islamists - the terrorists in that area, in that part of the world.

MARTIN: That's Joshua Hammer. He's the author of a new book called "The Bad-Ass Librarians Of Timbuktu." The book is available now, and we reached him in New York. Joshua, thanks so much for speaking with us.

HAMMER: Thanks a lot for having me, Michel.

Copyright © 2016 NPR. All rights reserved. Visit our website terms of use and permissions pages at www.npr.org for further information.

NPR transcripts are created on a rush deadline by Verb8tm, Inc., an NPR contractor, and produced using a proprietary transcription process developed with NPR. This text may not be in its final form and may be updated or revised in the future. Accuracy and availability may vary. The authoritative record of NPR’s programming is the audio record.