Islamist insurgents retreating from Timbuktu set fire to a library containing thousands of priceless historic manuscripts, according to the Saharan town's mayor, in an incident he described as a "devastating blow" to world heritage.

Hallé Ousmani Cissé told the Guardian that al-Qaida-allied fighters on Saturday torched two buildings that held the manuscripts, some of which dated back to the 13th century. They also burned down the town hall, the governor's office and an MP's residence, and shot dead a man who was celebrating the arrival of the French military.

French troops and the Malian army reached the gates of Timbuktu on Saturday and secured the town's airport. But they appear to have got there too late to rescue the leather-bound manuscripts that were a unique record of sub-Saharan Africa's rich medieval history. The rebels attacked the airport on Sunday, the mayor said.

"It's true. They have burned the manuscripts," Cissé said in a phone interview from Mali's capital, Bamako. "They also burned down several buildings. There was one guy who was celebrating in the street and they killed him."

He added: "This is terrible news. The manuscripts were a part not only of Mali's heritage but the world's heritage. By destroying them they threaten the world. We have to kill all of the rebels in the north."

On Monday French army officers said French-led forces had entered Timbuktu and secured the town without a shot being fired. A team of French paratroopers crept into the town by moonlight, advancing from the airport, they said. Residents took to the streets to celebrate.

The manuscripts were held in two separate locations: an ageing library and a new South African-funded research centre, the Ahmad Babu Institute, less than a mile away. Completed in 2009 and named after a 17th-century Timbuktu scholar, the centre used state-of-the-art techniques to study and conserve the crumbling scrolls.

Both buildings were burned down, according to the mayor, who said the information came from an informer who had just left the town. Asked whether any of the manuscripts might have survived, Cissé replied: "I don't know."

The manuscripts had survived for centuries in Timbuktu, on the remote south-west fringe of the Sahara desert. They were hidden in wooden trunks, buried in boxes under the sand and in caves. When French colonial rule ended in 1960, Timbuktu residents held preserved manuscripts in 60-80 private libraries.

The vast majority of the texts were written in Arabic. A few were in African languages, such as Songhai, Tamashek and Bambara. There was even one in Hebrew. They covered a diverse range of topics including astronomy, poetry, music, medicine and women's rights. The oldest dated from 1204.

Seydou Traoré, who has worked at the Ahmed Baba Institute since 2003, and fled shortly before the rebels arrived, said only a fraction of the manuscripts had been digitised. "They cover geography, history and religion. We had one in Turkish. We don't know what it said."

He said the manuscripts were important because they exploded the myth that "black Africa" had only an oral history. "You just need to look at the manuscripts to realise how wrong this is."

Some of the most fascinating scrolls included an ancient history of west Africa, the Tarikh al-Soudan, letters of recommendation for the intrepid 19th-century German explorer Heinrich Barth, and a text dealing with erectile dysfunction.

A large number dated from Timbuktu's intellectual heyday in the 14th and 15th centuries, Traoré said. By the late 1500s the town, north of the Niger river, was a wealthy and successful trading centre, attracting scholars and curious travellers from across the Middle East. Some brought books to sell.

Typically, manuscripts were not numbered, Traoré said, but repeated the last word of a previous page on each new one. Scholars had painstakingly numbered several of the manuscripts, but not all, under the direction of an international team of experts.

Mali government forces that had been guarding Timbuktu left the town in late March, as Islamist fighters advanced rapidly across the north. Fighters from al-Qaeda in the Islamic Maghreb (AQIM) – the group responsible for the attack on the Algerian gas facility – then swept in and seized the town, pushing out rival militia groups including secular Tuareg nationalists.

Traoré told the Guardian that he decided to leave Timbuktu in January 2012 amid ominous reports of shootings in the area, and after the kidnapping of three European tourists from a Timbuktu hotel. A fourth tourist, a German, resisted and was shot dead. Months later AQIM arrived, he said.

Four or five rebels had been sleeping in the institute, which had comparatively luxurious facilities for staff, he said. As well as the manuscripts, the fighters destroyed almost all of the 333 Sufi shrines dotted around Timbuktu, believing them to be idolatrous. They smashed a civic statue of a man sitting on a winged horse. "They were the masters of the place," Traoré said.

Other residents who fled Timbuktu said the fighters adorned the town with their black flag. Written on it in Arabic were the words "God is great". The rebels enforced their own brutal and arbitrary version of Islam, residents said, with offenders flogged for talking to women and other supposed crimes. The floggings took place in the square outside the 15th-century Sankoré mosque, a Unesco world heritage site.

"They weren't religious men. They were criminals," said Maha Madu, a Timbuktu boatman, now in the Niger river town of Mopti. Madu said the fighters grew enraged if residents wore trousers down to their ankles, which they believed to be western and decadent. He alleged that some fighters kidnapped and raped local women, keeping them as virtual sex slaves. "They were hypocrites. They told us they couldn't smoke. But they smoked themselves," he said.

The rebels took several other towns south of Timbuktu, he said, including nearby Diré. If the rebels spotted a boat flying the Malian national flag, they ripped the flag off and replaced it with their own black one, he said.

The precise fate of the manuscripts was difficult to verify. All phone communication with Timbuktu was cut off. The town was said to be without electricity, water or fuel. According to Traoré, who was in contact with friends there until two weeks ago, many of the rebels left town following France's military intervention.

He added: "My friend [in Timbuktu] told me they were diminishing in number. He doesn't know where they went. But he said they were trying to hide their cars by painting and disguising them with mud."

The recapture of Timbuktu is another success for the French military, which has now secured two out of three of Mali's key rebel-held sites, including the city of Gao on Saturday. The French have yet to reach the third, Kidal. Local Tuareg militia leaders said on Monday they had taken control of Kidal after the abrupt departure of the Islamist fighters who ran the town.

Reaction

'It's an absolute tragedy'

Essop Pahad, who was chairman of the Timbuktu manuscripts projectfor the South African government, said: "I'm absolutely devastated, as everybody else should be. I can't imagine how anybody, whatever their political or ideological leanings, could destroy some of the most precious heritage of our continent. They could not be in their right minds.

"The manuscripts gave you such a fantastic feeling of the history of this continent. They made you proud to be African. Especially in a context where you're told that Africa has no history because of colonialism and all that. Some are in private hands but the fact is these have been destroyed and it's an absolute tragedy."

He added: "It's one of our greatest cultural treasure houses. It's also one of the great treasure houses of Islamic history. The writings are so forward-looking on marriage, on trade, on all sorts of things. If the libraries are destroyed then a very important part of African and world history are gone. I'm so terribly upset at hearing what's happened. I can't think of anything more terrible."

Riason Naidoo, who directed the Timbuktu manuscripts project, said he is still awaiting confirmation of the extent of the damage. "It would be a catastrophe if the reports are true," he said. "I just hope certain parts of the building are unharmed and the manuscripts are safe."

The then South African president, Thabo Mbeki, was inspired by the "intellectual treasure" while visiting Timbuktu in 2001, and initiated a joint project between the two countries. He attended the opening of the Ahmad Babu Institute in 2009. A spokeswoman for the Thabo Mbeki Foundation said on Monday: "We haven't yet heard anything concrete as to what the real story is, so at the moment we can't really comment. We're getting mixed stories."

David Smith