Libya is the missing link in the Mali war and last month's assault by Al-Qaeda-affiliated militants against the In Amenas gas field in southern Algeria. The assault nearly precipitated a diplomatic crisis between the post-revolutionary Libyan government in Tripoli and Algiers, and Algerian officials have suggested that the attack could have been a form of “settling of accounts” with their government. Algerian Minister of Interior Dahou Ould Kablia has claimed that the assailants entered Algeria from Libya and that a number of Libyan citizens were involved in the assault. At least two Libyans were among those who died in the course of the Algerian military operation to free the hostages at the In Amenas facility. The Libyan connection acquired another dimension when the Algerian press accused the Al-Zintan revolutionaries in western Libya of selling arms to the terrorists, although the Al-Zintan groups deny this. In addition, a senior Algerian official said that number of the Egyptians involved in the armed attack against the gas-production plant in Algeria had previously been involved in the attack against the US consulate in Benghazi last September. For their part, Libyan officials have found it difficult to either confirm or deny charges that the terrorists had used Libyan territory as a staging post for the In Amenas attack. The Libyan authorities are already struggling to maintain control over the capital, let alone the long Western border with its rugged desert topography and climate, and its demographic mixture of Arab, Bedouin, Tuareq and Tebu tribes. Finally, Tripoli and Algiers managed to avert an escalation of the crisis, and the countries' prime ministers, together with their Tunisian counterpart, met in the Libyan town of Ghadames near the borders of both Algeria and Tunisia and agreed to combat the problem of terrorism and Islamist extremism, using force if necessary. Although the agreement has helped dispel the tension, there remains much to do to put it into effect on the ground. The Libyan connection with the Mali crisis and its repercussions predates the Libyan Revolution and the subsequent chaos in the region. For decades, the former Libyan leader Muammar Gaddafi was the strongman in the vast Sahara area that stretches from Darfur in Sudan to Morocco. Libya's huge oil surpluses were the key to his bolstering his influence and realising a form of regional hegemony, and with this in mind Gaddafi began his notorious war against Chad from the late 1970s to the late 1980s. Gaddafi favoured tactics that would wreak havoc on the social fabric of the region and that entailed exploiting historic grudges and ethnic tensions between the Arabs and the Tuaregs and African tribes. He created a so-called “Islamic Phalanx” to help carry out his war on Chad, and he stirred up Arab and Tuareg rancour against the black African majority in the south of the Sahara in order to further his own ambitions. Gaddafi's campaigns were one of the chief initial causes of the influx of arms into the region, and their aggravation of already existing ethnic tensions led to the eruption of civil and ethnic strife in neighbouring countries, such as the battles between Arabs and Africans in Darfur and the conflicts in Mali and Chad. Gaddafi's tactics together with mounting desertification and the persecution by sub-Saharan African regimes of Arabs and Tuaregs combined to destroy the traditional modes of coexistence, for the most part beneath an Islamist and Sufi cultural umbrella, that had existed between the Arabs and Tuaregs in the region. The Tuaregs were generally semi-nomadic pastoralists, and the Africans generally subsisted on agriculture. Although Gaddafi later revised his policies in the region and began to seek a rapprochement with the sub-Saharan governments, his destructive impact lived on even after his death. Hundreds of Islamist and Tuareg fighters, some of them former Gaddafi loyalists, fled Libya after the collapse of the Gaddafi regime, some of them carrying huge quantities of arms and money that they used to initiate rebel movements that have become increasingly active. The National Movement for the Liberation of Azawad (MNLA), which regards itself as the legitimate representative of the inhabitants of the Azawad, a territory situated in northern Mali, was formed by an alliance of Tuareg rebels who had returned to this area following the fall of the Gaddafi regime. The movement started its rebellion against the government in the south of the country on 17 January 2012, with an offensive against the Malian army, in which it scored several victories. Many of the Islamist extremists who subsequently turned against and defeated the MNLA also hailed from Libya. After supplanting the MNLA in Azawad, these militias joined forces with their counterparts in the area. As a result, there was nothing odd about the militant Islamist leaders wanting to occupy Gaddafi's sumptuous palace in the ancient city of Timbuktu. This served to symbolise that the Islamist extremists had assumed Gaddafi's place as a chief player in the politics of the region. However, if Libya has been a point of origin for part of the Mali war, it may also become one of that war's foremost victims. The Libyan borders are the easiest to access for Islamist militants fleeing the French invasion, and once inside Libya they will be able to link up to their Al-Qaeda-affiliated colleagues and shift their project for the creation of a jihadist Islamic state from the Mali desert to oil-rich Libya itself. Such an agenda will be aided by the general weakness of the Libyan army and police and the disarray and fragmentation of the Libyan revolutionary forces. Egypt, too, will not be out of reach of this danger. The Sahara is difficult to navigate for anyone but the Bedouins, Arabs and Tuaregs for whom it is familiar territory. The Islamist terrorists and militias that have made their bases in the Sahara have also become acquainted with the terrain, which they now negotiate with powerful Toyota land-cruisers that have taken the place of camel transport and shortened the vast distances across the desert. Egypt's south-eastern borders, which intersect the western-most portion of the Sahara, are among the country's most porous. The area is also sparsely populated, expansive and difficult to control, and Egypt is preoccupied with domestic concerns and the security situation in Sinai. These factors in Egypt, when combined with the situation in Libya, could furnish Al-Qaeda with a golden opportunity to regroup and reposition itself in an area near the heart of the troubled Arab Spring countries. Such a prospect would be all the more tempting following the harsh Algerian response to the Islamist seizure of the In Amenas natural gas facilities.