It was early in the summer of 2012, and at the Mamma Haidara Library in Timbuktu, a clandestine operation was under way. Night after night, a team under the direction of the library's founder, Abdel Kader Haidara, quietly packed the ancient works of astronomy, poetry, history, and jurisprudence into metal chests, then spirited them out of the library in mule carts and 4x4s to safe houses scattered around the city.

It was part of a last-ditch attempt to protect the country's most significant collection of historic manuscripts from falling into the hands of militants allied to al Qaeda in the Islamic Maghreb (AQIM). Six months earlier, terrorist groups had seized northern Mali and launched a systematic effort to destroy anything they viewed as haram—forbidden—according to their harsh interpretation of Islamic practices.

View Images

The extremists' inroads, militarily and culturally, held a sad irony: Haidara as a scholar and community leader had made it his life's work to document, as never before, Mali's achievements as an ancient center of progressive thought, including Islamic teachings that were anathema to the fanaticism that AQIM was now attempting to spread through the West African country.

And Haidara's manuscripts were precious for what they said more broadly about Africa's history. Harvard scholar Henry Louis Gates, Jr., who visited Timbuktu and Haidara in 1996, explains that Hegel, Kant, and other Enlightenment philosophers contended that Africa had no tradition of writing, and therefore no history and no memory.

"And unless you have those, you are not a civilization, which was a pernicious argument that provided justification for the slave trade," Gates said in a recent interview. "The absence of writing, of books, was seen as a reflection of the subhuman position of the Africans. So the presence of these books had high, high stakes, going back to the 18th century. Kant and Hegel and Hume did not know anything about this."

Over nine traumatic months, Haidara and his team rescued 350,000 manuscripts from 45 different libraries in and around Timbuktu and hid them in Bamako, more than 400 miles from the AQIM-controlled north. There were many close calls, including one involving Haidara's nephew, Mohammed Touré, a 25-year-old curator at the library. One night when he was leaving work with a trunk full of manuscripts destined for hiding, Touré came face-to-face with Oumar Ould Hamaha, one of AQIM's most inflexible zealots.

Hamaha shone a flashlight in Touré's face and demanded that he open the chest. "He said, 'You're stealing them,'" Touré recalled one recent afternoon in the Malian capital of Bamako. "I said, 'No, this is my library.'"

Islamic police arrested the curator and and dragged him to the commissariat of the Islamic police. He was charged with theft, a serious crime under sharia. "I risked losing my hand, my foot," Touré said. "They had already started chopping off hands in public places."

View Images Conservators repair manuscript pages using paper fabricated to match the originals. PHOTOGRAPH BY BRENT STIRTON, GETTY IMAGES

Thinking fast, Touré, who is well grounded in Islamic studies, cited hadiths and Koranic verses stating that incontrovertible proof of a misdeed was required before punishment was meted out. "They said, 'The proof is there; you were robbing this library.' I said, 'It belonged to me, and I was moving it to a more secure location.'" He bought himself time, but his fate was unclear.

His uncle swung into action. Having fled Timbuktu to live in self-imposed exile in Bamako, Haidara manned the phones, calling imams, neighborhood leaders, and other librarians, who came forward with documents and affidavits attesting to Touré's role as curator. After 24 hours in custody, the Islamic police let him go.

"Traumatized by the Jihadists"

But the face-offs with the jihadists kept coming. AQIM operatives stopped, searched, and arrested Haidara's couriers. Bandits captured a boat full of books on the Niger River and held it for ransom. Malian government soldiers often broke open trunks full of manuscripts in a search for weapons, roughly pawing through the fragile volumes.

In the last phase of the rescue, during the French military intervention of January 2013 that drove AQIM from northern Mali, a French helicopter nearly fired missiles at a boat bringing manuscripts downriver—the pilots suspected that Haidara's assistants were smuggling guns. "We were completely traumatized by the jihadists. All we could do was work," Haidara told me in Bamako, of that difficult time. "I could never have imagined such a thing happening just a few months before. Everything collapsed overnight. The state had stopped existing. So we just had to keep working, doing what we could do. I had lots of friends, lots of partners, people who gave me a lot of advice, so that I never felt completely abandoned."

A Grand Culture Rediscovered

For Haidara, 50, the scion of a distinguished family of scholars and collectors from Timbuktu and other towns along the Niger in northern Mali, the rescue marked the culmination of a long career as a champion of the country's cultural patrimony.

"Abdel Kader feels as close to the manuscripts as he does to his children," says Stephanie Diakité, an American attorney who became entranced by the works 20 years ago during a visit to Mali and decided to make their preservation her life's calling.

She worked side by side with Haidara in Bamako to raise $1 million from benefactors in Europe, the U.S., and the Middle East to finance the rescue effort. Adds Diakité: "He feels as much responsibility for them as he does for his own family."

I first met Abdel Kader Haidara eight years ago, when I flew to Timbuktu to write about the country's rediscovery of its literary heritage. The city's production of manuscripts reached its apogee in the 15th and 16th centuries, when Timbuktu was a commercial hub on the Niger and a center of academic studies with more than 150 universities. Passed down through the generations by Timbuktu's leading families, the volumes were often locked away, forgotten, and permitted to disintegrate. UNESCO began drawing attention to the works in the 1960s, funding a national library, the Ahmed Baba Institute, and scouring the region for lost works, but it wasn't until Haidara became involved in their conservation effort that the city's literary renaissance began in earnest.

Haidara and I met up at his Mamma Haidara Library, a handsome limestone villa in the heart of the old town, with the best samples from his collection displayed in vacuum-sealed glass cases in air-conditioned and well-lit rooms. By 2006, when I visited Haidara—an imposing and ebullient figure who was clad that day in a beige skullcap and draped in a peacock-blue traditional gown known as a bubu—scholars and historians from across Europe and the Middle East were flocking to the Mamma Haidara to study a collection that offered perhaps the most revealing glimpses of what Timbuktu had been at the height of its glory.

Haidara took me around the collection. The manuscripts were bound in goatskin and handwritten in delicate calligraphy, with flourishes of gold and pen-and-ink drawings of mosques and desert landscapes. They included accounts of the battles fought by medieval Malian kings and their armies; treatises on traditional medicine, Islamic jurisprudence, and mathematics; volumes of romantic poetry; and Koranic studies, all testifying to the complex, intellectually challenging society that had flourished in Timbuktu for hundreds of years, until the Moroccan army invaded in the late 16th century, sacked the city, and carried its scholars off to slavery in Fez.

One of the most valuable manuscripts in Haidara's collection was a later work comprising just a few pages: an 1853 epistle by Sheikh al-Bakkay al-Kounti, a spiritual leader in Timbuktu, to the ruling sultan of Masina, asking him to spare the life of German explorer Heinrich Barth. The sultan had ordered Barth's execution because non-Muslims were barred from entering the city, but al-Bakkay argued that Islamic law forbade the killing. "He is a human being, and he has not made war against us," al-Bakkay wrote. Barth remained under the protection of al-Bakkay and made it back to Germany unharmed. "The manuscripts show that Islam is a religion of tolerance," Haidara told me that day, arguing that his collection would go a long way toward breaking negative perceptions in the West.

View Images The Mamma Haidara center restores, catalogues, repairs, and digitizes manuscripts to provide the most complete history that can be assembled. PHOTOGRAPH BY BRENT STIRTON, GETTY IMAGES

"Custodian of a Great Intellectual Tradition"

Abdel Kader Haidara's father, Mohammed Haidara, nicknamed Mamma, was born in the town of Bamba on the Niger in 1897, in the early years of French rule. A self-taught scholar, he amassed a large quantity of rare handwritten books.

"Since the 16th century our ancestors had been acquiring manuscripts," Haidara told me. "They had built up a library in Bamba, and my father added to it. He traveled all over Africa, bringing back manuscripts from Chad, Sudan, and Egypt." He also helped augment the manuscript collection of the Ahmed Baba Institute, created by UNESCO in 1967 with the objective of preserving the region's rich written history.

In 1981, Mohammed Haidara died at the age of 84. The director of the Ahmed Baba Institute, Muhammed Zubair, asked Abdel Kader, who was then 17, to replace his father as head collector. Haidara told him he wasn't interested. "I wanted to go into business and make money, not work in a library," he says. The director kept pursuing him. "He said, 'This is your work, this is your destiny. You've got a great responsibility. You are the custodian of a great intellectual tradition.'"

After months of prodding, Haidara dropped his plans for a business career and began intensive training, learning everything from conservation techniques to how to assess the monetary value of individual works. Soon he was hooked.

"When I was at the Ahmed Baba Institute, I had an office that was filled with manuscripts. When I was home, manuscripts surrounded me. My friends told me, 'You've gone crazy. You can't talk about anything but these manuscripts.' They had this smell, the manuscripts, and they said, 'You're smelling of manuscripts, Abdel Kader.' I said, 'Leave me alone, just leave me to it.'"

Haidara began knocking on the doors of families in Timbuktu, trying to persuade them to bring their manuscripts out of hiding. Resistance was intense. Many families were so skittish, after a century of French pillaging, that they refused even to discuss the issue. "Little by little, I sensitized people to the conservation work the library was doing," he says.

Then he traveled by motorized dugout canoe along the Niger and by camel caravan across the Sahara, visiting chiefs and family librarians in remote villages. "People would say, 'The manuscripts are for us, and they don't leave our presence. What do you want to do with them?' And I would explain, 'I want to take them to Timbuktu. There's a center there; they will conserve them, display them, and put them in good condition. They will be there for everybody, the whole world to share and see.'"

When the art of persuasion failed, Haidara tried playing on guilty consciences, pointing out the appalling neglect that many of the books had suffered: water damage, termite infestations. In the end, he resorted to cash. He carried around a suitcase full of money, which he dispensed lavishly—building mosques and schools; buying cows, camels, and goats for collectors and village chiefs. After a decade of near-ceaseless travel, Haidara managed to grow the Ahmed Baba's manuscript collection to more than 20,000 works.

Preserving Mali's Heritage

In 1993, Haidara quit his job at the Ahmed Baba Institute and went out on his own, trying to raise funds to house the family archive. A breakthrough appeared imminent in 1996, when he received a call from the Libyan government, promising him "assistance." Weeks later a delegation dispatched by Muammar Qaddafi showed up at his home, pored through the Mamma Haidara collection—and offered to buy everything on the spot and take it all back to Tripoli.

"They said, 'We want everything we see here, even the trunks. We will pay you in any currency you want. Just name your price.'" Haidara insisted that he wasn't even tempted. "They couldn't believe it," he says. "They asked, 'Why not?' I said, 'Because this isn't for me. This is the heritage of Mali, of a great nation. It's not for sale.'"

The real breakthrough came shortly afterward, when Professor Gates stopped in Timbuktu while making a television documentary series about Africa. Haidara showed his manuscripts to the Harvard scholar, who had delved only lightly into the written history of black Africa.

"It was one of the most moving days of my life. I was tearing up on camera," recalls Gates. "I was so emotional, holding these books in my hands. I'd thought they were a legend at best, from the time I was a boy, reading Ripley's Believe It or Not. But they were actually real." Gates was also impressed by Haidara, "this colorful man, not extravagant or flamboyant, but deeply learned. He was riveting to interview."

Gates helped secure a grant from the Andrew Mellon Foundation, which allowed Haidara to keep searching for family books and to construct a library to house them. The same year Savama-DCI, a foundation that Haidara established to encourage others with access to family collections to follow in his footsteps, received a $600,000 grant from the Ford Foundation to construct two new libraries in Timbuktu: the Al-Wangari and the Allimam Ben Essayouti. Dozens of other libraries have sprung up in subsequent years.

Jihadist Takeover

Haidara was traveling in Burkina Faso when the Islamist and Tuareg rebels began their march toward Timbuktu in late March 2012. He arrived back home just hours after the rebels seized the city. Overnight, Timbuktu was plunged into a nightmare. The police, the army, and all government officials fled, along with thousands of ordinary citizens. Looters filled the streets, pulling cash out of banks, ripping apart stores, breaking into houses and hotels with impunity.

Then the first Islamist policemen began to appear, driving pickup trucks draped in black jihadist flags.

View Images Abdel Kader Haidara sorts through trunks of ancient manuscripts. PHOTOGRAPH BY BRENT STIRTON, NATIONAL GEOGRAPHIC

At first Haidara tried to act as though nothing had happened. He went about his business and kept the library open, avoiding any contact with the cold-eyed, bearded, Kalashnikov-toting jihadists who wandered the streets. "I didn't talk to them, they never called me, they never noticed me."

But quickly he realized that the radicals would soon take undisputed power, and when they did Haidara was sure they would target the manuscripts. These books—scattered in 45 libraries across the city, most of which Haidara had helped get built—epitomized the reasoned discourse and traditions of intellectual inquiry that the militants, with their rigid views of Islam, their intolerance, and their hatred of modernity and rationality, wanted to destroy.

A month into the jihadist takeover, Haidara and his nephew, Touré, began venturing into the markets of Timbuktu, buying up metal cantines, or trunks, and storing them at the Mamma Haidara and other libraries around the city. When they had bought every one in Timbuktu, they found more in markets farther south; when those ran out, they purchased metal oil drums and brought them to a craftsman in the river town of Mopti, and he hammered them into trunks.

Behind locked doors, Haidara, Touré, and a few other volunteers packed the manuscripts into the trunks. They worked often by flashlight because the jihadists had cut all the power. By July they managed to transport all 350,000 manuscripts from Timbuktu's libraries to safe houses around the city, owned by the relatives of library owners.

Haidara fled Timbuktu for Bamako in May, to coordinate the fund-raising campaign and to put the brakes on UNESCO delegates in Mali who wanted to publicize the jihadist threat. Haidara feared that such attention would alert Timbuktu's occupiers to the manuscripts' value. "I said, 'I think that right now, just stay silent. Don't do anything. Don't speak about them.' UNESCO said, 'OK, you're right. We'll leave it.'"

Haidara's wife, Khadija, and their six children—including a son who was born prematurely and cannot stand or speak—joined him in Bamako two months later. (Haidara has a second wife, not an unusual practice in Mali, also named Khadija, who is a high-ranking Malian diplomat based in Paris.)

Held in a Squalid Jail

By September, the news was becoming grim: Salafists had burned a library near Tripoli and destroyed hundreds of manuscripts; at about the same time, radicals in Timbuktu had embarked on a brutal campaign to destroy the tombs of the city's revered Sufi saints, breaking the tombs apart with pickaxes. When Haidara got the word that the militants—feeling stronger and more confident—had removed checkpoints across northern Mali, he gave the orders to his operatives to begin moving the manuscripts from Timbuktu's safe houses to Bamako.

Between September and January, couriers made hundreds of trips back and forth between the two cities in rented 4x4s, usually carrying two or three cantines of manuscripts on each journey. The trips seldom went smoothly: On his first journey south, Mohammed Touré was stopped half a dozen times at Malian government checkpoints. Soldiers harassed him, breaking the locks off his trunks and rifling through the works. His vehicles broke down twice; his driver got lost en route.

After a week on the road, he reached Bamako, where he was rearrested and held in a squalid jail. "Abdel Kader arrived, had to pay a lot of money, and we were finally liberated, with the manuscripts," he says. "You didn't have any choice but to continue. You had to keep working. It got a little easier over time. I made this journey many times. I paid them off repeatedly—the soldiers, the police—and they got to know me, and it became easier."

Weeks before the French military arrived in Mali, AQIM closed all roads leading to the south, forcing Haidara to resort to plan B: organizing dozens of boats to carry the manuscripts down the Niger. By the end of February 2013, Haidara had succeeded in evacuating nearly every manuscript from 45 libraries to safety. The only casualties: 4,200 manuscripts that were burned to ashes in a bonfire set by militants at the Ahmed Baba Institute just minutes before the militants fled the city ahead of the French invasion.

"I'm All the Time Surrounded by Worry"

I caught up with Haidara one final time in mid-February 2014, on the top floor of a four-story apartment building in the Baco Djikironi Golf neighborhood of Bamako. Haidara had transported dozens of chests to this newly acquired safe house during the rainy season that had ended the previous month, and he was checking to see how well the manuscripts were holding up.

"We were obliged to find houses that were raised off the ground, with air-conditioning or dehumidifiers to better preserve them," he explained, thumbing through a 500-year-old work from Timbuktu's Sankoré Library, its yellowing pages bound by a dark-brown goatskin cover. The book was a kind of medieval Encyclopaedia Britannica, Haidara said, chronicling the lives of Islamic scholars, broken into short biographical sections with delicate flourishes, such as green, red, and gold embossed letters marking the beginning of each new section. Scribblings by many different hands filled the margins, presumably added by scholars at Sankoré who consulted this work for their own research through the ages. "It's obvious that it's an important work," he told me. "It's from the 16th century, and it's still readable, and it's filled with statements that shows it's been consulted by many intellectuals. That gives it a great value."

View Images Haidara, an Islamic scholar, sorts through ancient manuscripts. PHOTOGRAPH BY BRENT STIRTON, GETTY IMAGES

Haidara had expected to escort all the manuscripts back to Timbuktu by now, but continuing instability in the north had made that impossible. (During my visit to Timbuktu in February, jihadists clashed with French Special Forces just north of Timbuktu and fired rockets at the city's airport. Shortly after my visit to Mali, French forces tracked down and killed Oumar Ould Hamaha, the AQIM fanatic who had arrested Touré on that night in Timbuktu two years earlier.)

The continuing state of limbo was taking a toll on Haidara: "I'm all the time surrounded by worry, by responsibility, sometimes I even forget my family," he admitted. "My only ambition is to rehabilitate all these libraries in Timbuktu, so that I can bring all the manuscripts back to each family that entrusted them to me. That will give me a little bit of peace."

The Pulitzer Center on Crisis Reporting (http://pulitzercenter.org/) helped support reporting for this story.