On the northwestern edge of Timbuktu, where the mud-and-limestone houses give way to the endless sands of the Sahara, sits a small restaurant and bar called Amanar. The name means Orion in the Tamashek language of the Tuareg people, and the constellation features on the restaurant’s logo above a camel playing the saxophone. Besides the food – grilled fish, chicken kebabs and tigadegena, a peanut butter sauce with meat – music is what has always given Amanar its flavour. In the afternoon you could sip a beer under the trees and listen to Malian blues. Later on, a DJ would play dance tracks or there might have been a performance by one of Mali’s world-renowned artists such as the late Ali Farka Touré, Habib Koité or Tinariwen.

January was always the busiest time at Amanar, when thousands of Malians and foreign music fans descended for the annual Festival in the Desert, which took place among the dunes, a short walk from the restaurant. But in the run-up to the 2012 concert series, ill winds were blowing into town. Al-Qaeda-linked militants kidnapped three tourists – two from Holland and a South African – and killed a German at a Timbuktu hotel, jeopardising the event. Amid heavy security, it went ahead, with Bono among the much-reduced number of overseas guests. Almoubareck Ag Yehia, the softly spoken 42-year-old owner of Amanar, recalls that the atmosphere was more subdued than usual. “People were worried about their safety, and when that happens they can’t enjoy themselves,” he said.

For the people of Timbuktu, the loss of the tourist business was only one worry. From the town of Kidal near the Algerian border, a 15-day camel ride away, came word that a new rebellion was brewing. Flush with weapons from Libya, separatist Tuaregs – a traditionally nomadic Berber people who live in and around the Sahara – were preparing for another war with the government, the fourth since independence from France in 1960. The idea of a break­away state held little appeal for most of the 50,000 people in Timbuktu where, as for the whole of the vast, sparsely populated northern half of Mali, Tuaregs are in the minority. Besides the light-skinned Tuaregs, like Ag Yehia, and Arabs, the town is home mainly to black Malians: Songhais, Fulanis and black Tamashek and Arabic speakers. The different groups have lived together for centuries, often intermarrying. Ag Yehia’s wife is a Songhai and they have a son and a daughter, aged 10 and eight respectively.

“Many Tuaregs do not support rebellion,” said Ag Yehia, a slim man with close-cropped hair and the hint of a moustache. “We had seen it three times before and it never worked.”

Almoubareck Ag Yehia, a Tuareg, outside his ransacked restaurant last month

Only days after the festival ended, the Tuareg militants, known as the National Movement for the Liberation of Azawad (MNLA), clashed with the army in the far north of Mali. Ag Yehia decided to leave Timbuktu. He locked his restaurant and drove south for two days to Bamako, with his wife and children. Ag Yehia knew they would be safe in the capital but with the rebellion turning national sentiment against the Tuaregs, he might not. After bidding farewell to his family, he hitched a ride to the Mauritanian capital Nouakchott on the Atlantic coast, where he had friends and hoped to find work.

As the MNLA gained ground, with help from Islamist militias, tens of thousands more people emptied out of towns and villages in northern Mali, including Ag Yehia’s elderly mother, who fled to Burkina Faso. On March 22 2012, officers angry at the lack of government support toppled President Amadou Toumani Touré. Amid the confusion, the militants saw an opportunity to seize control of the entire north. Before dawn on April 1, Timbuktu residents heard gunshots, then explosions. The army had fled in the night and an Arab militia that had pledged to guard the town were looting the armoury and shops. A few hours later the rebels arrived.

…

Few places have a more fabled history than Timbuktu. Founded more than 1,000 years ago as a Tuareg camp, it became a key staging post for the caravan routes running across the Sahara and its fringes. Gold, slaves and smooth tablets of rock salt cut from the desert arrived and departed on camelback or on boats plying the nearby Niger River. Islam flourished from the 14th century when the king of the Malian empire Mansa Musa (together with 60,000 followers) returned from a pilgrimage to Mecca during which he had given away and traded so much gold that it distorted regional prices of the precious metal for a decade. On reaching Timbuktu, Musa ordered the construction of the vast Djingereyber mosque, with two mud minarets and space for 2,000 people inside.

Following a visit in 1510, the Spanish-born Moor Leo Africanus described a town fringed by trees and grazing elephants with “a great store of doctors, judges, priests and other learned men, that are bountifully maintained at the king’s cost. And hither are brought diverse manuscripts or written books out of Barbary [north Africa], which are sold for more money than any other merchandise”. But Timbuktu’s glory years were soon to end. In 1591 it was sacked by Moroccan raiders, and decline set in. When a French explorer, René Caillié, reached the town in 1828 disguised as a Muslim – he was the first European to make it home alive afterwards – it seemed to him, at first sight, “a cluster of poorly built mud houses”.

Alassane Hassey, in charge of restoring the town’s mud mosques and shrines

Yet as Unesco recognised in 1988 when it made sections of Timbuktu’s historic centre a World Heritage Site, the architecture is, in its own way, spectacular. Its ancient mosques, houses and shrines to scholars and saints may be built of mud, and limestone bricks in some cases, but they have endured hundreds of years of coruscating winds and flash thunderstorms thanks to their careful construction and the dedication of generations of residents. Every year, for a day or two, the townspeople stop work to congregate around the mosques that constituted the medieval University of Timbuktu: Djingereyber, Sidi Yahya and Sankore. Under the guidance of the restorer-in-chief, Alassane Hassey – a 71-year-old builder with powerful upper arms, salt-and-pepper stubble on his head and a beard that has turned to yellow – a special concoction is plastered on the vulnerable parts of the mosques’ walls, reinforcing them for a further 12 months. With a twinkle in his eye Hassey reveals the recipe: dried mud from the desert mixed with sand and water, gum arabic, powder from the fruit of a baobab tree, rice husks “and a bit of magic”.

Architecture is not all that has been preserved. Over the past two decades tens of thousands of the ancient manuscripts referred to by Leo Africanus, which date back to the 13th century and cover everything from astronomy to women’s rights, have emerged from trunks buried in the sand or kept in the dark corners of family homes for hundreds of years. Many are now housed in private libraries or the government-run Ahmed Baba Institute, which moved to new headquarters in 2009 with state-of-the-art preservation facilities and rooms for visiting scholars.

For the casual traveller, the town’s remoteness, tolerant values and old-world feel were other attractions. You could sleep on a mattress on the roof of a hotel in the hot months, as the locals do, explore the narrow sand streets of the medina on a motorcycle taxi or trek into the desert on camelback.

…

Weapons left behind by Islamist rebels at a military camp in the centre of the town

Timbuktu’s new conquerors swept into town in four-wheel-drive pickups mounted with heavy weapons. The secular MNLA was quickly muscled aside by the two Islamist groups: Al-Qaeda in the Islamic Maghreb had an Algerian leadership and foot soldiers drawn from various countries across the Sahara and beyond; Ansar Dine (Defenders of the Faith) was a Tuareg-led movement. They started by targeting businesses that they deemed haraam (“forbidden”), sacking the few hotels in town owned by westerners as well as other places that served alcohol. Militants broke the locks on the doors at Amanar and removed everything inside, including the fridges, crates of empty beer bottles, air conditioners, speakers, disco lights and kitchen equipment. Even the board on which the plat du jour was written was torn down. What wasn’t stolen was burnt in the road in front of the restaurant. In Nouakchott, Ag Yehia learnt what had happened with dismay when he logged on to Facebook.

Sign erected by Islamists declaring that Timbuktu is governed by sharia law

Smoking was outlawed. Bracelets and rings were banned, and musical ringtones on mobile phones too. Women and girls were told to cover their heads and hands, and not to be seen in male company on the street. Offenders were flogged on the spot with whips normally used to beat camels. The rebels carried around scissors so they could cut off the bottoms of men’s trousers. Ankles, they insisted, must be bared. For the most serious crimes against Islam, the punishment was turned into a public spectacle: 400 lashes for each offender in the case of an unmarried couple having sexual relations.

What angered residents most was the destruction of cultural and religious landmarks. A gunman used a bulldozer to topple the famous monument to al-Farouk, the patron djin (genie) who had watched over the town from a flying horse. Sufism, the mystical tradition of Islam, is widely followed in Timbuktu and residents often pray at the shrines of the town’s saints. The Islamists banned this practice, then used hammers and picks to destroy some of the most prominent mud shrines, including two at the side of the Djingereyber mosque. “I just sat downstairs crying with my wife and children,” said Hassey, the old builder. “There was nothing we could do, as these people had weapons.”

Tina Traoré, who led protests against Islamist restrictions on women’s behaviour and dress

Though many of the rebels were foreign, or Malians from outside Timbuktu, some were local. The most feared of them was Mohamed Mossa, a Tuareg, who was the Islamists’ police chief and delighted in personally punishing women. He turned a tiny room in a bank into a prison, cramming in a dozen female “offenders” at a time. Still, not everyone was cowed. Tina Traoré, a fish-seller, is a bubbly woman with a fondness for colourful print dresses and chunky earrings. She hated being forced to cover her head and her blood boiled every time she saw a girl or woman beaten on the streets. In October last year, after six months under occupation, she decided to act.

Traoré, 45, convinced 10 female friends to march with her on the Islamist headquarters in protest at the beatings, and at the lack of work, both for women and men. Along the way, other women joined them; soon there were several hundred demonstrators. Gunmen fired into the air to force them to disperse. Six of the women, including Traoré, were put into a car and driven to an office where Mossa and Sanda Ould Bamana, an Arab native of the town who had become the Islamists’ spokesman, were waiting. “They kept us there for five hours and said we would be killed if we marched again,” Traoré said.

Like other people in the town, she became resigned to a long period of harsh rule. By December, talk of foreign intervention to oust the rebels had come to nothing. Ag Yehia, penniless and tired of searching for work, left Nouakchott and trekked back across the Mauritanian desert to the Mbera refugee camp, 40 miles from the border with Mali, which already housed 70,000 of his countrymen. He was given a place in a shared tent, a card for food rations and shown where to queue for water.

French president François Hollande arrives with Mali’s Dioncounda Traoré in February

Then, in early January this year, the Islamists made a fatal mistake. In a surprise offensive, hundreds of militants from Timbuktu and other northern bases advanced south, taking over several towns. Mali’s interim president appealed to France for help, and President François Hollande agreed. On January 11, French jets and helicopters attacked the advancing Islamists, killing dozens and destroying many of their vehicles. A fortnight later, French paratroopers floated down through the night sky above Timbuktu. The militants had fled; the town was free.

“That day there was no need to cook or eat,” said Traoré, the woman who had led the protest. “I was just dancing left, dancing right, in the sand.”

…

A French soldier stands guard in front of Timbuktu’s Djingereyber mosque in January

In some cases fairly and in many cases not, the light-skinned Tuaregs and Arabs of northern Mali were widely viewed as sympathetic to the rebels. Fearing retribution, Timbuktu’s Tuaregs and Arabs fled the town once the Islamists left. Many of their shops and homes were vandalised and looted. A group of women demolished the mud house of Mossa, the police chief. In the following weeks, French forces, aided by African troops, forced the Islamists out of the urban centres in northern Mali. Black residents of Timbuktu who had departed before or during the occupation started to return, to count their losses.

In late July, with Burkinabe, Togolese and Malian troops patrolling the town in pickups mounted with heavy weapons, women were striding around proudly without headscarves. Cartons of cigarettes and bottles of whisky, gin and pastis were displayed openly in the market. Yet if the Islamists’ ideas had not stuck, their actions had yet to be undone. Faces painted on signs outside hair salons and beauty parlours remained blacked out. On one side of town, a roadside board announced to visitors that they were entering an area of sharia law. The famous sign, “Welcome to Timbuktu, City of 333 Saints”, still had the last two words obscured.

“Welcome to Timbuktu” sign defaced by Islamists to remove the reference to Sufi saints

In the various cemeteries, meanwhile, where graves are marked by bulbous clay pots, some of the most famous saints’ shrines were now little more than piles of mud bricks. In all, 16 mausoleums were destroyed. The ancient wooden door at the side of the Sidi Yahya mosque, which according to legend should only be opened at the end of the world, but was smashed by the Islamists, was still bricked up. Inside the mosque, a few men were curled up like cats on the carpets, resting in the afternoon heat. “I begged them not to break the door but they did not listen,” said Sidi Mohamed Kunta, a 70-year-old iman’s assistant with a wispy beard. “These people were not good Muslims.”

The Ahmed Baba Institute, which boasts a priceless collection of 24,000 manuscripts, had also suffered. The militants had used it as a base; in July, one of the fighters’ short-legged uniforms still lay discarded in the filthy public bathroom. A pillar nearby was scarred with fire – the Islamists had burnt some of the manuscripts here before fleeing. Conservationist Bouya Haidara, a short, jovial man, explained that 4,203 manuscripts had been destroyed or stolen. The rest were saved, however, by chance and thanks to the bravery of staff.

Haidara led the way down a corridor into a dimly lit basement area and unlocked a door. Inside it was sweltering and pitch-black, so he used his mobile phone to illuminate the metal racks where 10,486 manuscripts lay. The Islamists had not discovered the room nor did they realise that another 9,000-odd of the institute’s manuscripts were still being stored at the old building across town. Starting in July 2012, under the cover of night, Haidara and his colleagues had carefully stacked the brittle documents in wheelbarrows and pushed them to their homes where they were packed into metal trunks. These were then loaded into commercial vehicles bound for Bamako. Tens of thousands of manuscripts held in private libraries were spirited out of the town in a similar manner, somehow evading discovery at the Islamist checkpoints. “We knew that if we had been caught, bad things would have been done to us,” said Haidara, resting the remains of a partially charred manuscript in his palms.

Charred remains at the Ahmed Baba Institute

Under the rebels all the schools had been forced to close. Now, though it should have been the summer holidays, pupils were in class, catching up. Many families were struggling to afford food so the children were provided with meals by the World Food Programme. Some shops were trading; you could buy large tablets of salts, leather saddles for donkeys and Fuji film. But no banks had reopened yet and money was in short supply.

Even though it had been six months since the liberation of the town, most Tuaregs and Arabs had yet to return to Timbuktu, and in some areas virtually every house was vacant. Mali’s military had been accused of killing or “disappearing” dozens of light-skinned northerners when the French intervention began and fear was still keeping people away. Sidi Mohamed Ould Sidi Hamadi, a 56-year-old Arab man with Coke bottle glasses, was keeping a low profile in a house at the edge of town. He had only plucked up the courage to return from a desert camp because his wife was ill.

“There are 40 families with us in the desert and there is no food or money. But people are very scared to come into Timbuktu,” he said.

Bombed remains of a mansion once owned by colonel Gaddafi that was used by Islamists

Sprawled on a mattress on the second floor of his house, Salem Ould Elhadj, who is the town’s best-known historian and is also Ag Yehia’s father-in-law, said that the breakdown of trust between the Tuaregs and Arabs, and the rest of the town’s population, would take time to repair.

“People think that you can just forget and respect one another again but that’s not easy to do. This problem depends on the ‘whites’ [Tuaregs and Arabs] – those who have done bad things need to admit it and then people will accept them back.”

Ag Yehia, of course, had done nothing wrong and was desperate to see his family and begin rebuilding his life. In early July he left the Mauritanian refugee camp, travelling to Bamako to meet his wife and children. The couple decided that she would drive directly to Timbuktu, a journey that would involve passing through many military checkpoints. A safer option for him was to return to Mauritania, with his son and daughter, and look for a driver who could take them off-piste through the desert to Timbuktu. An Arab man who said he knew the terrain well enough to avoid any roadblocks agreed to give them a lift and, after packing their luggage in his four-wheel-drive, they crossed the border into Mali. By the time they neared the town of Goundam, about 60 miles from Timbuktu, they had not even seen a soldier.

Malian soldiers patrol the streets in the wake of the French-led offensive

But then, in a small village, the driver suddenly pulled over and asked Ag Yehia and his children to get out. He had had second thoughts about going all the way to Timbuktu. “They will kill you if you go there,” he told Ag Yehia, leaving all three of them stranded by the side of the road. It was 11am on July 25. Ag Yehia persuaded a villager with a donkey cart to transport them to the main road to wait for a lift. At 6pm, with the sun sinking fast, a black Malian on his way to Timbuktu stopped and picked them up. It was dark when they reached the entrance to the town and Ag Yehia waited nervously as soldiers at the checkpoint examined his papers. They waved him through.

For the next few days Ag Yehia spent the daylight hours at his restaurant, assessing the damage and “letting people know that I am back”. He set up a few tables that a neighbour had saved during the Islamist ransacking and purchased some soft drinks in case any customers stopped by. After five days none had.

His mother was still in Burkina Faso, and some of his uncles in Mauritania. As he sat with his son outside the restaurant he wondered aloud who was to blame for Timbuktu’s troubles. The MNLA? The Islamists? Mali’s previous government? All of them, in some way, he decided. He fiddled with the portable radio in his hand. “It feels like I have just been born. Everything is lost.”

——————————————-

Xan Rice is the FT’s west Africa correspondent.

To comment, please email magazineletters@ft.com