Being a newly independent country from colonial rule of a Western power – France – and having waged a liberation war with a socialist orientation, Algeria was naturally inclined to turn towards the Soviet Union and its allies.
However, the Algerian commitment to supporting anti-colonial movements in Africa went against American interests in the continent, which led to an indirect conflict with the United States and an increasingly hostile relationship between the two countries.
This role is perfectly summarized by Amilcar Cabral's – leader of the African Party for the Independence of Guinea and Cape Verde – famous declaration that Algeria was the "Mecca of revolution".
Indeed, the Algerian foreign policy had been influenced by Frantz Fanon's and other radical Third World thinkers' urgings to "export revolution" to other countries suffering from the yoke of imperial oppression.
By 1963, Algeria was offering refuge, funds, weapons and training to rebels from a dozen African countries: the left-wing opposition in Morocco, the secessionist Sanwi government in Ivory Coast, the Sawaba party in Niger, the CNL (or "Simbas") in Congo-Leopoldville, the UPC in Cameroon, the MPLA and FNLA in Angola (250 recruits were trained in Algeria and 70 tons of armaments were sent to this country), and several armed groups in Zanzibar, Portuguese Guinea, South Africa and Namibia.
However, these global Third World solidarity links went further than Africa: for example, the National Liberation Front of South Vietnam opened a permanent office in Algiers (one of only two that were located in non-communist countries).
Therefore, if the multipolarity of international relations – the traditional East versus West bipolarism, but also the intra-communist poles and the development of Third World alternatives – had benefitted the non-aligned states such as Algeria, the latter's increasing reliance on the Soviet Union – especially since the Sand War against Morocco in 1963 – risked jeopardizing the country's independence and its relations with other powers, such as the United States or China.
Algerian foreign relations during the presidency of Houari Boumediene marked a shift towards more stable and Algero-centered policies, in opposition to Ben Bella's cosmopolitism.
After Nasser's death in 1970, Boumediene increasingly represented the political project of Pan-Arabism; and in 1973, Algeria played a major role in the organization of the war against Israel, as well as calling for oil to be used as a weapon in the OPEC.
Moreover, in 1969, Algiers hosted the Pan-African Cultural Festival: this grandiose display of an African identity, forged from the continent's common experience of Western imperialism, reunited anticolonial militants from numerous countries of the Third World.
Furthermore, the main points of Boumediene's address to the United Nations General Assembly in 1974 – reparations for colonization and a transfer of resources from North to South – were adopted by UN.
The notion of a "new international economic order" emerged as a way to reshape the world economy to the benefit of developing countries, based on the principle of sovereign equality between states.
Boumediene took pride in Algeria's non-aligned status, by claiming its distance from both Soviet-style socialism and Western capitalism, while the country enjoyed an increasing prosperity.
The USSR, on the contrary, was able to deliver military equipment, industrial expertise, and trade outputs: the Soviets replaced France as the first destination for Algerian wine, and provided 200,000 tons of wheat when a drought hit the country in 1966.
Indeed, despite the break of relations with the United States after the Six-Day War in 1967, the Americans had almost replaced France as Algeria's primary trade partner by the early 1970s.
After Spain announced its intention to abandon the province, then known as Spanish Sahara, in 1975, the united front presented by the Maghreb nations quickly disintegrated, as a result of Morocco, and subsequently Mauritania, staking claims to the territory.
This agreement violated a United Nations (UN) resolution that declared all historical claims on the part of Mauritania or Morocco to be insufficient to justify territorial absorption and drew heavy Algerian criticism.
[142] In August 2023, Algeria proposed a six-month civilian-led transition to resolve Niger's political crisis, diverging from potential military intervention discussed by ECOWAS, emphasizing diplomacy and seeking UN involvement while hosting a conference on Sahel region development.
[142] In 1987 the departure from power in Tunisia of President Habib Bourguiba and his replacement by the more diplomatic Zine el Abidine Ben Ali brought the two nations closer again.
Moreover, they more pragmatically believed that to defend themselves from American hostility, they ought to encourage revolutions elsewhere in Latin America and in Africa as to distract the United States and create new allies.
This relationship was mutually beneficial: Algeria received Argentinian training guerrilleros, a delegation of the Venezuelan National Liberation Front, and even sent armaments to the latter (in an Algerian ship, as to avoid American control) at Cuba's request.
Since the September 11, 2001 attacks in the United States, contacts in key areas of mutual concern, including law enforcement and counter-terrorism cooperation, have intensified.
In the mid 90s, while Israel and north African states slowly started diplomatic relations, Algeria remained one of the last countries to consider such a move.
[180] In December 2001, the Algerian firm Sonatrach and Cyprus oil company Medex Petroleum signed an exploration deal covering the north of Bordj Omar Idriss in the Illizi basin in south-eastern Algeria.
[181] Cyprus is considering Algeria as a potential partner to assist with extracting untapped oil and gas from the island's exclusive economic zone.
Greece was among the early countries to establish diplomatic relations with Algeria after its independence in 1962, by upgrading the then Greek Consulate General in Algiers to an embassy in 1963.
In the same year, Greek exports to Algeria amounted to $50.78 million, consisting mainly of cereals and related derivatives, tobacco products, pharmaceuticals, medical and non-ferrous minerals.
[160] Algeria and Serbia (formerly Yugoslavia) formed a strong diplomatic relation shortly after the Algerian independence, marked by economic, military but also ideological cooperation.
Their alliance was also geopolitically strategic: Algeria constituted a gate into the African and Arab worlds for Yugoslavia, who intended to create stronger links with this continent.
Therefore, while Yugoslavia benefited from Algerian close relations with African countries, Algeria could use Yugoslavian greater military and logistical resources to pursue its program of exporting revolution in the continent.