section_path: Government and politics/Foreign relations
section_name: Foreign relations
paragraph_text: Foreign relations
  
  Morocco is a member of the United Nations and belongs to the African Union (AU), Arab League, Arab Maghreb Union (UMA), Organisation of Islamic Cooperation (OIC), the Non-Aligned Movement and the Community of Sahel–Saharan States (CEN–SAD). Morocco's relationships vary greatly between African, Arab and Western states. Morocco has had strong ties to the West in order to gain economic and political benefits. France and Spain remain the primary trade partners, as well as the primary creditors and foreign investors in Morocco. From the total foreign investments in Morocco, the European Union invests approximately 73.5%, whereas the Arab world invests only 19.3%. Many countries from the Persian Gulf and Maghreb regions are getting more involved in large-scale development projects in Morocco.
  
  In 2002, a dispute with Spain in 2002 over the small island of Perejil arose, which brought attention to the issue of the sovereignty of Melilla and Ceuta. These small enclaves on the Mediterranean coast are surrounded by Morocco and have been under Spanish administration for centuries.
  
  In 2004, the George W. Bush administration granted Morocco the status of major non-NATO ally. Morocco was the first country in the world to recognise US sovereignty, in 1777. After gaining independence, Morocco established strong ties with the United States, receiving significant economic and military aid. This partnership flourished during the Cold War, with Morocco becoming a key ally against communist expansion in North Africa. In return, the US supported Morocco's territorial ambitions and efforts to modernise its economy. Morocco received more than $400 million in American aid between 1957 and 1963, which elevated it to the fifth-largest recipient of US agricultural assistance by 1966. The long-lasting relationship between the two nations has endured, with the US remaining one of Morocco's top allies. Additionally, Morocco is included in the European Union's European Neighbourhood Policy (ENP), which aims at bringing the EU and its neighbours closer.
  
  Morocco's membership in the African Union has been marked by significant events. In 1984, Morocco withdrew from the organisation after it admitted the Sahrawi Arab Democratic Republic in 1982 without conducting a referendum of self-determination in the disputed territory of Western Sahara. This decision was made unilaterally by Morocco. However, in 2017, Morocco rejoined the AU, signaling a shift in its diplomatic stance. In November 2020, Brahim Ghali, leader of the Polisario Front and the Sahrawi president, unilaterally ended a 29-year-old ceasefire agreement with Morocco overseen by the United Nations. In December 2020, Morocco had started to pursue military cooperation with Israel from a normalization agreement. Algeria backs the Polisario Front of Morocco's breakaway state, the Western Sahara. In August 2021, Algeria severed diplomatic relations with Morocco. Algerian authorities have accused Rabat of supporting the Movement for the Self-Determination of Kabylie (MAK), which it classifies as a terrorist organisation.