Under Salek, a twenty-man junta calling itself the Military Committee for National Recovery (Comité Militaire de Redressement National--CMRN) assumed power. The CMRN was a centrist, moderate, pro-French and pro-Moroccan regime, whose first mandate was to bring peace to Mauritania. The Polisario, which believed Mauritania would withdrew from the war if given the opportunity, declared a unilateral cease-fire, which the CMRN accepted at once.
Salek and the CMRN then directed its collective diplomatic attention to Morocco, whose troops were still thought necessary to protect SNIM operations and thus enable the Mauritanian economy to recover. Following Morocco's lead, the CMRN opposed the creation of a new, independent state in the Western Sahara, although Salek did not rule out the possibility of a federated state with limited autonomy. In the meantime, while Polisario guerrillas and Moroccan troops continued to fight, the Mauritanian Army withdrew from active participation in the war, although the CMRN was constrained from signing a peace treaty in order to placate Morocco. Within a short time, however, Polisario leaders had become increasingly impatient with Mauritania's inability to make a conclusive commitment to peace, and in April 1979 they demanded the evacuation of Mauritanian troops from Tiris al Gharbiyya as a precondition for further talks.
The difficulties facing the Salek government multiplied and soon proved to be insurmountable. His regime failed to overcome Morocco's resistance to any settlement of the Western Sahara conflict. The death of Algerian president Houari Boumediene in December 1978 further heightened tensions. Also, Senegalese president Leopold Senghor, who was displeased with Salek's ties with Morocco, instigated a press campaign that highlighted racial problems in Mauritania. Salek did little to ease the racial problem when, in March 1979, he named eighty-one Maures and only seventeen blacks to his new national advisory committee. Finally, the French government lost confidence in Salek's ability to extricate Mauritania from both the Western Sahara war and Moroccan influence. Isolated and weak, Salek's government was overthrown on April 6, 1979, by Colonel Ahmed Ould Bouceif and Colonel Mohamed Khouna Haidalla, who formed the Military Committee for National Salvation (Comité Militaire de Salut National--CMSN). Salek, however, was permitted to remain in the government as a figurehead president. In late May, Bouceif was killed in an airplane crash; Haidalla was designated prime minister, and Colonel Mohamed Louly was named president.
In July 1979, its patience exhausted, the Polisario ended its cease-fire. Confronted with endless warfare and total economic collapse, the CMSN on August 5 signed a peace treaty in Algeria with the Polisario, according to which Mauritania renounced all territorial and other claims over the Western Sahara. The Polisario, in return, renounced all claims regarding Mauritania. Most significant, Mauritania recognized the Polisario as the sole legitimate representative of the people of the Western Sahara, although in an effort to convince Morocco of its neutrality in the conflict, it did not recognize the Polisario's governing arm, the Sahrawi Arab Democratic Republic (SADR). The CMSN government also agreed to withdraw from Tiris al Gharbiyya. However, just a few days after the signing of the peace treaty, Morocco occupied Tiris al Gharbiyya, rendering the issue moot and threatening the peace.
In Mauritania, Haidalla was faced with the daunting task of consolidating power. To his credit, in January 1980 he proclaimed Mauritanian neutrality in the Western Sahara conflict and convinced Morocco to evacuate all its troops from Mauritanian soil. From the beginning of his regime, however, Haidalla was viewed with hostility by the southern black population; a native of the Western Sahara, he was perceived by the blacks as an Arab and a northerner. He was also mistrusted by pro-Moroccan political groups because he had signed the peace treaty with the Polisario. To ensure strict Mauritanian neutrality in the ongoing conflict, he reshuffled the top echelons of the government, removing both pro-Moroccan and staunchly pro-Polisario factions. He also assumed the title of president and removed Louly and CMSN vice president Ahmed Salem Ould Sidi from office, thereby eliminating all serious political competitors.
Haidalla initiated several important policy changes to broaden his base of support. In 1980, to further strengthen his position with Mauritania's blacks and to undercut black opposition groups in Senegal, he officially abolished slavery. In December 1980, in the face of growing apprehension among CMSN members, he formed a civilian government, naming Ahmed Ould Bneijara prime minister. He also initiated steps to draft a constitution establishing a multiparty, democratic state.
Among Mauritanians both inside and outside the country, however, political opposition to Haidalla grew. In May 1980, following Haidalla's dismissal of Louly and Sidi, a number of foreign-based opposition movements joined together in France to form an opposition group called the Alliance for a Democratic Mauritania (Alliance pour une Mauritanie Démocratique--AMD). The AMD wanted to restore civilian rule and introduce a multiparty democracy in Mauritania. Its principal political supporter was former President Daddah, who as a result of French pressure had been released from prison in August 1979. Also joining the AMD was former Vice President Sidi. The AMD received financial support from those Arab states of the Persian Gulf that opposed Haidalla's anti-Moroccan leanings--he had moved to eliminate pro-Moroccan members of the CMSN--and his support of self-determination for the radical SADR. The same Arab states also reduced their aid to Mauritania, which only encouraged Haidalla to strengthen ties to more radical Arab countries like Libya and Iraq.
Meanwhile, relations with Morocco continued to deteriorate. Discord between the two countries had been mounting since early 1981, when Morocco accused Mauritania of sympathizing with the Polisario and harboring its fighters. Morocco was also responsible for rumors suggesting that Libya was shipping arms to the guerrillas via a landing strip at Chegga in northeastern Mauritania. On March 18, 1981, pro-Moroccan members of the AMD led by Sidi and former air force commander Mohamed Abdelkader attempted to topple the government. The coup failed, and both were subsequently executed. In April, following the attempt, Haidalla and the CMSN decided to abandon civilian rule and replaced the fledgling constitutional government with a six-member military government headed by Colonel Maaouiya Ould Sid Ahmed Ould Taya.
As Mauritania's relations with Morocco worsened, its ties with Algeria improved. Algeria cultivated a friendship with Haidalla and supplied him with sophisticated military equipment, ostensibly to deter invasion from Morocco. In June 1981, in an effort to restore diplomatic relations with Morocco, Haidalla agreed to a summit meeting to be arranged and hosted by Saudi Arabia, one of Mauritania's largest aid donors. At the summit, Morocco's King Hassan II and Haidalla signed an agreement restoring diplomatic relations and prohibiting the transit through either country of forces hostile to the other. This last provision alluded to both the Polisario and the Moroccan branch of the AMD. The reconciliation, however, was short lived. On the one hand, Morocco refused to expel AMD members, and on the other hand King Hassan accused Mauritania of allowing Polisario guerrillas to launch attacks against Morocco from Mauritanian base camps. Subsequently, Moroccan aircraft bombed the Mauritanian city of Bir Aidiat near the border with the Western Sahara, where Polisario guerrillas had taken refuge, and threatened further reprisals against Mauritania.
In February 1982, former CMSN president Salek and former Prime Minister Bneijara, among others, tried unsuccessfully to oust Haidalla. Having survived a second coup attempt, Haidalla relied on his forceful personality, self-discipline, and integrity to gain the respect of many of his countrymen. The eleven-month period between February 1982 and January 1983 gave the regime the opportunity to politicize the population. Haidalla hoped that by establishing a working foundation of civilian politics he could abolish the military regime and be elected to office as a civilian. Accordingly, in 1982 the government organized what were labeled Structures for Educating the Masses (Structures pour l'Education des Masses--SEM), which acted on a range of public issues through elected delegates. Haidalla also pursued his goal of national reconciliation by releasing some of the political prisoners incarcerated since the overthrow of the Daddah regime.
Domestic peace was shattered briefly in January 1983, first when Haidalla discovered a coup plot supported by Libya and, later, when a Moroccan gunboat attacked a Mauritanian garrison near La Guera, the only Western Sahara territory still occupied by Mauritania. Although neither incident caused any casualties or serious diplomatic repercussions, the Moroccan attack demonstrated Mauritania's continuing vulnerability. Haidalla responded to these incidents by strengthening relations with France; the latter had already been instrumental in reestablishing communication between the Mauritanian and Moroccan governments following their 1981 break. The more significant diplomatic movement, however, saw Haidalla develop warmer relations with Algeria and the SADR. During the June 1983 summit meeting of the Organization of African Unity in Ethiopia, Haidalla joined Senegalese president Abdou Diouf and Ethiopian leader Mengistu Haile Mariam in drafting a resolution calling for a cease-fire and peace negotiations in the Western Sahara. Morocco failed to comply with the resolution by the end of the year, and Haidalla recognized the SADR in February 1984.
The January 1983 Libyan-supported coup plot had soured relations between Mauritania and Libya; however, Libyan leader Muammar al Qadhaafi, a strong supporter of the Polisario, took advantage of Mauritania's break with Morocco and began a new campaign to reestablish cordial ties with Haidalla. Haidalla's warming relations with Libya, Algeria, and the Polisario, however, alienated the conservative Arab countries on which Mauritania depended for most of its economic aid and also factions in his own government, which favored ties to Morocco, and those who opposed the existence of the SADR. Moreover, Haidalla angered many CMSN members by his decision to recognize the SADR without consulting them.
More ominous was Morocco is movement of troops toward Mauritania's northern border in the aftermath of Mauritania's recognition of the SADR. The presence of thousands of Moroccan soldiers on the Mauritanian border, only four kilometers from Mauritania's key economic center at Nouadhibou, again raised the possibility of another Moroccan attack on La Guera. In addition, Morocco had begun to construct a berm near the Mauritanian border that would restrict Polisario guerrillas to Mauritanian territory for their rear bases, thus providing Morocco with justification for attacking northern Mauritania.
By 1984 the Haidalla regime was under siege not only for its regional policies but also for corruption and mismanagement, especially within the SEMs, which were viewed by the population as vehicles for advancing the president's own interests. Furthermore, upheavals in the military compromised the loyalty of key officers, particularly at a time when the army was being asked to perform the impossible task of protecting Mauritania's vast northern regions from Morocco's attacks across the border. A severe drought compounded the regime's difficulties, forcing much of the population into the country's few urban areas and increasing Mauritania's dependence on foreign economic aid.
In the third ministerial purge in six months, Haidalla named himself prime minister in March 1984 and took over the defense portfolio. Taya, who had held both positions, was demoted to chief of staff of the armed forces. The move infuriated Taya's allies on the CMSN. As chairman of the CMSN, Haidalla was supposed to represent a collective body. Instead, he attempted to amass considerable personal power and alienated many in the top echelons of government. On December 12, 1984, while Haidalla was out of the country, Taya, in a quiet and bloodless coup d'état, became Mauritania's president.