A declassified CIA document from February 13, 1987, analyzes potential military escalation between Morocco and Algeria. The report considers scenarios following Morocco's successful defense against Polisario attacks after building the Sand Wall. A CIA document from February 1987, declassified in August 2012, estimated that a war between Algeria and Morocco could have broken out at any time in the past. However, the leaders of both countries tried to avoid anything that could lead to a military escalation, given the scenario of an impossible victory of one army over the other. Entitled «Morocco-Algeria: Living near the brink», the document states that the main problem between the two countries remains the Western Sahara conflict. It states that this issue «prevents a normalisation of bilateral relations» between the neighbors. It further emphasizes the lack of trust, evidenced by the close proximity of their forces along the border. According to US intelligence, neither country is prepared to make «substantial concessions». «Algeria almost certainly will continue its long-standing diplomatic campaign to isolate Morocco until Rabat accepts earnest negotiations with the Polisario Front leaders. Consequently, we see little prospect of a diplomatic solution», reads the CIA document. «We believe that the prolongation of the Western Sahara war will occasionally prompt Algeria and Morocco to move closer to hostilities», adds the same source. Two armies ready for any eventuality «having nothing to show for their diplomatic efforts, the increasingly frustrated Algerians may try to use just enough force to jolt Rabat out of its intractability», the CIA warned. The document suggests Algeria's frustration could lead to forceful measures to pressure Morocco, potentially including direct military involvement on behalf of the Polisario. The report cites Algeria's 1984 «brinkmanship policy» of ambushing a Moroccan patrol as an example of its willingness to escalate. CIA also points to previous border clashes in 1963 and 1976 as evidence of their history of brinkmanship. In 1963, the two countries had a series of clashes along their Saharan border (the Sand War), and again in 1976, during two battles in the region. The CIA points out that the two countries have been on the brink of war on several occasions. «Algiers did this in 1984 - maneuvering its forces and ambushing a Moroccan border patrol - when Rabat was energetically driving the Polisario guerillas from their Western Sahara strongholds», the document recalled. The document details the 1984 events: Moroccan forces expelled the Polisario from their camps, prompting Algeria to send military aircraft into Moroccan airspace. Similarly, in 1976, Algerian forces were expelled from the Amgala region after battles with Morocco. «The Moroccan strategy was to erect a sand fence around much of Western Sahara, which worked to Rabat's advantage in terms of military control over most of the disputed territory», the CIA added. The situation has hampered the Polisario militias, but eased the pressure on King Hassan II (1962-1999) to enter into direct negotiations. Algiers at the foot of the wall The CIA notes Morocco's construction of a sand berm as a successful strategy for territorial control, hindering Polisario operations. However, it also highlights how this move relieved pressure on late King Hassan II to engage in direct negotiations. The report quotes a senior Algerian official expressing a desire for a face-saving solution, contrasting it with Morocco's perceived goal of total Polisario defeat. The document outlines potential Algerian responses to the sand berm's effectiveness. These include deploying armored battalions or aircraft to breach the wall, but acknowledges the high risk of triggering a full-blown war with Morocco. In retaliation, Morocco is seen as capable of launching air strikes on Polisario camps near Tindouf. The report suggests both sides would rely on surprise attacks to avoid ground-to-air missile interception.