The bone-dry wood creaks as the book opens at a page representing the course of the moon, framed by black balls and red crescents. The manuscript contains 132 pages of Arab astronomy bound in well-worn leather, a 15th-century treasure stored, with similar items, in a cardboard box in a traditional dwelling in Chinguetti. This historic town, on the Adrar plateau in Mauritania, holds some of the finest collections of old Arabo-Berber books, but now the desert libraries are disappearing.

With a sudden decline in tourism, Mauritania is spending all available resources on security and combating al-Qaida in the Islamic Maghreb. The government has no time for heritage. "It's not been a priority in recent years," the arts minister, Cissé Mint Cheikh Ould Boide, acknowledges. Handed down from generation to generation the manuscripts, some of which date from the 10th century, still belong to families and are dispersed around four main centres, Chinguetti, Ouadane, Oulatane and Tichitt. The towns have been on the Unesco World Heritage list since 1996. On the route of pilgrims travelling to Mecca and of caravans loaded with dates and salt serving a vast area from northern Mauritania to Sudan, the towns used to be a major tourist attraction. But visitors are scarce and the books are being forgotten.

"Until the colonial era they were the only form of reading matter, often consulted and sometimes copied. But with our modern ways they are increasingly regarded as mere relics," says Jiyid Ould Abdi, the head of Mauritania's Scientific Research Institute. To remedy this situation the government is planning a big event – Nouakchott, Capital of Islamic Art – for 2011. It hopes to form an international panel to select 35 projects and attract foreign capital. The scheme will focus largely on Moorish civilisation, disregarding black Mauritanian culture represented by the Pular, Wolof and Soninke ethnic groups.

The institute, located next to the National Museum in the capital, lacks the resources to protect the manuscripts. Only a handful have been restored, with the date and author cited on the final page recorded in a database. The modern laboratory, set up in adjoining premises with help from Italy, is just ticking over. A technician cautiously gives us a demonstration, placing the book in a glove-box and using a brush to clean each page, a little pump sucking up the desert sand. Then the manuscript is transferred to a plastic pouch containing no oxygen, and is set aside for three weeks, long enough to kill any bacteria. A simple carton binding is fitted and the original cover is scanned and returned to its owner.

Out of more than 33,000 ancient Arabic manuscripts identified at the end of the 1990s in Mauritania barely a tenth have reached the museum. Most of the books are still in the hands of private owners. "We have tried everything. We have offered to compensate the families or just look after them [the books] with a guarantee of property, but it makes no difference," Abdi says. "It is a legacy from their ancestors and an honour to keep them. Everyone does their best [storing the books] in trunks or boxes. It is storage, not conservation." Even a German-sponsored project to record the manuscripts on microfilm ran into opposition.

About 600km north-east of the capital, in Chinguetti, once a centre of Islamic learning, the Habott family owns one of the finest private libraries, with 1,400 books covering a dozen subjects such as the Qur'an and the Hadith (the words of the Prophet), astronomy, mathematics, geometry, law and grammar. The oldest tome, written on Chinese paper, dates from the 11th century.

Four generations have watched over the fine collection started by Sidi Ould Mohamed Habott in the 19th century. Their ancestor travelled by camel to Mecca to find these treasures – "six months there, six months back" – following in the footsteps of the scholars who handed down, exchanged and copied the books in the course of their caravan journeys. Indeed, this is how Islam took root in Mauritania. "With neither agriculture nor raw materials, the country coalesced around its culture," Abdi explains. "All the scholars had their own library," wrote the French ethnologist Odette du Puigaudeau in reference to the "leather-bound books brought back from North Africa, Egypt and Syria […] by pilgrims and messengers".

Every year the Habott family meets to appoint a custodian for the manuscripts. The library fittings are rudimentary, comprising metal cabinets, archive boxes and large jars of water in the four corners of the room to release some moisture into this sandy world. Sand is everywhere, a fearsome enemy, surrounding the town and advancing several metres a year. Across the square it has engulfed the old citadel, leaving only a few walls and a mosque.

In a nearby house Seif Islam, the manager of the local secondary school, watches over another library with about 700 dusty volumes. "The state has been trying to lay its hands on them for years," he says. "Would you part with your hand or your foot? It [the library] is a part of us." Until recently, the desert libraries attracted many visitors, contributing to the development of Chinguetti and its sister cities.

However, since the killing of four French tourists in December 2007 and the kidnapping of other Europeans for which al-Qaida claimed responsibility, visitors have become increasingly rare. The sandy streets are empty and the shops closed for lack of custom. On the only paved road from Nouakchott to Akar, an hour from Chinguetti, there is little traffic. Work is hard to find and young people are leaving for the capital, making the desert seem all the more lonely.

This article originally appeared in Le Monde