Some time at the start of the 16th century, a young Arab diplomat from Morocco headed south across the Sahara. His destination was Gao, a large city on the Niger River in West Africa, then the capital of the Songhai Empire.
The Songhai Empire was little known to the West at that time, but it was one of the largest Muslim realms in the world.
The rulers of the Songhai controlled an enormous territory across what are today the countries of Niger, Nigeria and Mali. At one point it even stretched to the coast at the western-most point of Africa.
The Songhai Empire was then at its high point, a state grown rich and powerful controlling trans-Saharan trade between the cities of North Africa and the African continent.
The diplomat, Al Hassan ibn Muhammad Al Fasi, wrote a detailed description of his journey, spanning nine books, a section of which was devoted to Timbuktu, a flourishing city to the north of Gao.
When the Pope of the time read the book he was so impressed that he ordered it to be translated from Arabic into Latin. From there it entered English and other European languages, in the process creating a myth about Timbuktu that persists to this very day.
The book was A Description of Africa and the author, known to the West as Leo Africanus, wrote about the magnificence of Timbuktu.
"The royal court is magnificent and very well organised," he wrote. "When the king goes from one city to another with the people of his court, he rides a camel and the horses are led by hand by servants … The king has about 3,000 horsemen and infinity of foot-soldiers.
"There are many wells containing sweet water in Timbuktu; and in addition, when the Niger is in flood canals deliver the water to the city. Grain and animals are abundant, so that the consumption of milk and butter is considerable."
What Al Fasi described was a city that was anything but remote; rather, it was deeply tied into the trade of the known world. He described horses coming from North Africa, cowrie shells from Persia used as currency and fabrics imported from Europe.
Al Fasi's book, published in the 1550s, created the myth of Timbuktu, a city at the end of the world, the first that emerges out of the endless Sahara desert.
For centuries, Timbuktu became to the European imagination an idea rather than a reality, on to which myths were gradually overlaid.
What was to the Islamic world a city of incredible wealth, became to Europeans emblematic of distance, a world so remote that it practically did not exist, like the myth of Atlantis.
So prevalent was this myth in the minds of Europeans that it remains in the West today. As French forces entered the city this week to retake it from Al Qaeda militants, many expressed surprise that Timbuktu actually existed.
But the history of this city is far older and far more interesting than even Al Fasi knew.
The idea of Timbuktu existed in Europe because of Al Fasi's travels, but he had come rather late to the city.
When he visited in the 16th century, Timbuktu was not the end of the world but the beginning of another one. The vast Sahara may have cut off casual travel between North Africa and the rest of the African continent, but there were already close trade links between the two.
Beyond Timbuktu, the lands stretched south towards the bend in the African continent and the Gulf of Guinea where, even past the limits of the Songhai empire, there were other African states and empires. A whole collection of African states rose and fell by the mouths of the Niger River, around present-day Nigeria.
The area around Timbuktu had been known to the Arabs since at least the 9th century. The historian Ahmad Al Yaqubi mentioned the then-city state of Gao in his Tarik ibn Wadih (the Chronicle of Ibn Wadih), published in the middle of the 9th century.
From about the 12th century, the city of Timbuktu grew as a trading centre for caravans heading north to Morocco and east into Africa.
But it was really after the adoption of Islam in about the 13th century that the links between the Arab world and the region expanded. The coming of Islam brought trade and enormous wealth to the states centred around the Niger River and Timbuktu.
The annual Haj pilgrimage meant that sweeping caravans went across the Sahara, by way of Egypt and also the North African coast road, down to Mecca on the Arabian Peninsula. The caravans brought back goods to trade, people and expertise.
The world of West Africa, and beyond it the kingdoms near the Gulf of Guinea, was suddenly opened to the Muslim empires and Asia.
Timbuktu thrived. As a city at a crossroads it acquired money and people. Schools were set up, first to study Islamic law, and then the other subjects common to the Muslim canon - astronomy, medicine, mathematics.
Arabic became the lingua franca, allowing scholars to move freely and converse across a vast area. From West Africa to Central Asia and India, there was a common language of science and learning, and the books piled up in Timbuktu, hundreds of thousands of them, written in classical Arabic and passed down through generations.
Two hundred years before Al Fasi's journey, the Moroccan traveller Ibn Battuta had visited and written about the city, now very much part of the fabric of the wider Islamic world.
The city became known to Muslims as a great seat of learning, a city with universities that taught 25,000 students and housed one of the world's greatest libraries.
"Gold comes from the South, salt from the North, but learning comes from Timbuktu," ran an African proverb.
None of this was yet known to Europeans. The publication of Al Fasi's book coincided with the beginning of the era of exploration. European ships were heading south and east, looking for a sea route to India, trying to bypass the Muslim empires that dominated the trade routes from Asia.
The fascination with the "other" was partly rooted in genuine curiosity, but focused by the need to understand cultures in order to trade and later to seek advantage over their rulers. The history of Europe's involvement in Africa had begun, and it would not be pleasant for the continent.
Spurred on by the stories of wealth and remoteness of Timbuktu, European explorers organised expeditions to find the city.
One of the earliest, in 1788, came from a group of Englishmen who tried to chart the course of the Niger River. It failed, but a few years later a Scottish explorer called Mungo Park apparently reached the city. He sent a brief letter back but was killed soon after.
It wasn't until 1828 that a European, the French explorer Rene Caillie, returned from the city.
Fully half a millennium had passed between the arrival of Ibn Battuta and the arrival of the first European explorer.
In that time, the fortunes of Timbuktu had risen and fallen. The city had grown from a trading post to one of the world's greatest seats of learning, only to fall back as empires, trade routes and armies shifted across its territory.
Today, the city whose name instantly evokes the remote and the unknown is back in the news, but its secrets and its learning, hidden in manuscripts and buried in the desert, remain unknown, awaiting discovery.