The history of Algeria from 1962 to 1999 includes the period starting with preparations for independence and the aftermath of the independence war with France in the 1960s to the Civil War and the 1999 presidential election.

Independence In preparation for independence, the CNRA (Conseil National de la Révolution Algérienne) had met in Tripoli in May 1962 to work out a plan for the FLN's (Front de Libération Nationale) transition from a liberation movement to a political party. The Tripoli Program called for land reform, the large-scale nationalization of industry and services, and a strong commitment to nonalignment and anti-colonialism in foreign relations. The platform also envisioned the FLN as a mass organization broad enough to encompass all nationalist groups. Adoption of the Tripoli Program notwithstanding, deep personal and ideological divisions surfaced within the FLN as the war drew to a close and the date for independence approached. Competition and confrontation among various factions not only deprived the FLN of a leadership that spoke with a single voice, but also almost resulted in full-scale civil war. According to historian John Ruedy, these factions, or "clans" did not embody "family or regional loyalties, as in the Arab East, because the generations-long detribalization of Algeria had been too thorough. Rather, they represented relationships based on school, wartime or other networking."

The Armée de Libération Nationale (ALN) commanders and the GPRA (Gouvernement Provisionel de la République Algérienne) struggled for power, including an unsuccessful attempt to dismiss Colonel Houari Boumédiènne, chief of staff of the ALN in Morocco. Boumédiènne formed an alliance with Ahmed Ben Bella, who together with Mohamed Khider and Rabah Bitat, announced the formation of the Political Bureau (Bureau Politique) as a rival government to the GPRA, which had installed itself in Algiers as the "Provisional Executive". Boumédiènne's forces entered Algiers in September, where he was joined by Ben Bella, who quickly consolidated his power. Ben Bella purged his political opponents from the single slate of candidates for the forthcoming Algerian National Assembly elections. However, underlying opposition to the Political Bureau and to the absence of alternative candidates was manifested in an 18 percent abstention rate nationwide that rose to 36 percent of the electorate in Algiers.

The creation of the People's Democratic Republic of Algeria was formally proclaimed at the opening session of the National Assembly on September 25, 1962. Ferhat Abbas, a moderate unconnected with the Political Bureau, who had previously headed the GPRA, was elected president of the assembly by the delegates, and Ben Bella was named prime minister. On the following day, Ben Bella formed a cabinet that was representative of the Political Bureau but that also included Boumédiènne as defense minister as well as other members of the so-called Oujda Group, who had served under him with the external forces in Morocco. Ben Bella, Boumédiènne, and Khider initially formed a triumvirate linking the leadership of the three power bases — the army, the party, and the government, respectively. However, Ben Bella's ambitions and authoritarian tendencies were to lead the triumvirate to unravel and provoke increasing discontent among Algerians.

Aftermath of the war The war of national liberation and its aftermath severely disrupted Algeria's society and economy. In addition to the physical destruction, the exodus of the colons deprived the country of most of its managers, civil servants, engineers, teachers, physicians, and skilled workers — all occupations which colonial policy had prevented or discouraged the Muslim population from pursuing. The homeless and displaced numbered in the hundreds of thousands, many suffering from illness, and some 70 percent of the workforce unemployed. Distribution of goods was at a standstill. Departing colons destroyed or carried off public records and utility plans, leaving public services in shambles. So, not only were the Algerian countryside and infrastructure destroyed, but also, almost half the rural population was forcibly displaced. Algerians now faced the task of replacing the colonial administration, which had been run by European settlers who left en masse after independence in 1962. Staffing these positions was especially difficult due to the fact that 86% of Algerians were illiterate in 1954. In 1962, the year of independence, not many Algerians had a university education, and although the number of university graduates increased throughout the 1960s and 1970s, it was still not enough to avoid certain political and social consequences. Given the low number of educated Algerians in 1962, the few university graduates had to carry the burden of helping rebuild a country following years of colonial occupation. They had to attempt to come up with solutions to issues like access to healthcare, transportation, and the eradication of illiteracy.

Along with the help of Algerian university graduates, the solutions to these problems were often found through international assistance from actors like France, the Soviet Union, Cuba, Yugoslavia, and the Arab world. Rather than commit to being part of a single world bloc (whether that be the US-led capitalist bloc or the Soviet-led communist bloc), Algeria remained non-aligned, focusing on organized, state-led development, investing in healthcare, education, agriculture, oil, and petrol. The role of university students in helping rebuild post-independence Algeria is often ignored, however. Projects like Generation Independence, a series of documentaries about Algerian university graduates in the 1960s and 1970s, attempt to rectify that.

Another challenge the newly sovereign Algerian government faced in the aftermath of the war was resettling the millions of displaced Algerians, both within Algeria's borders and outside of them. When neighboring countries Tunisia and Morocco became independent in 1956 (two years after the Algerian war for independence began), many Algerians fled to them to escape the violence within their borders. Later in the war, when the French army began to create 'forbidden zones' in the mountainous regions of the country, the number of Algerians fleeing their home country sharply increased, as they sought to avoid being sent to regroupment camps (camp de regroupement.)

While before the end of the war, the FLN struggled to exercise sovereignty within Algerian borders, it found diplomatic strength in interacting with international organizations dealing with refugees, most notably the UNHCR. In claiming responsibility for the Algerian refugees in Morocco and Tunisia, the FLN assumed state-like responsibilities. In tandem, through accepting Algerian refugees, newly independent Morocco and Tunisia were able to assert their "new-found sovereignty in the international sphere." In the war's aftermath, repatriating refugees from Tunisia and Morocco to Algeria would require considerable effort on the part of all three states and the UNHCR, and in determining which populations qualified for international assistance to return to Algeria (or which were really Moroccan or Tunisian subjects), formal and documented national identities were formed and enforced in the "previously fluid and intermingled populations of French north Africa." While some nomadic tribes during French colonization flowed easily through the now hardened national borders, independence for Morocco, Tunisia, and now Algeria, meant that these tribes would have to remain inside the borders of one state. In all, the refugee crisis created by the war for independence presented the Algerian state with considerable challenges as a newly established government, while also providing them a channel to establish their statehood through diplomacy in north Africa and with international aid organizations.

The months immediately following independence witnessed a pell-mell rush of Algerians, their government, and its officials to claim the lands, houses, businesses, automobiles, bank accounts, and jobs left behind by the departed Pieds-Noirs. By the 1963 March Decrees, Ben Bella declared that all agricultural, industrial, and commercial properties previously operated and occupied by Pieds-Noirs were vacant, thereby legalizing their confiscation by the state. The term "nationalization" was not used in the decrees, presumably to avoid indemnity claims.

The FLN called its policy of widespread state involvement in the economy "Algerian socialism". Public-sector enterprises were gradually organized into state corporations that participated in virtually every aspect of the country's economic life. Although their activities were coordinated by central authorities, each state corporation was supposed to retain a measure of autonomy within its own sphere.

The departure of European owners and managers from factories and agricultural estates gave rise to a spontaneous, grass-roots phenomenon, later termed autogestion, which saw workers take control of the enterprises to keep them operating. Seeking to capitalize on the popularity of the self-management movement, Ben Bella formalized autogestion in the March Decrees. As the process evolved, workers in state-owned farms and enterprises and in agricultural cooperatives elected boards of managers that directed production activities, financing, and marketing in conjunction with state-appointed directors. The system proved to be a failure, however. The crucial agricultural sector suffered particularly under self-management, partly as result of bureaucratic incompetence, graft, and theft.

Ben Bella and the FLN Whereas Ben Bella could count on the support of an overwhelming majority in the National Assembly, an opposition group led by Hocine Ait Ahmed soon emerged. Opponents outside the government included the supporters of Messali Hadj, the PCA, and the left-wing Party of the Socialist Revolution (Parti de la Révolution Socialiste, PRS) led by Mohamed Boudiaf. The communists, who were excluded from the FLN and therefore from any direct political rule, were particularly influential in the postindependence press. The activities of all these groups were subsequently banned, and Boudiaf was arrested. When opposition from the General Union of Algerian Workers (Union Générale des Travailleurs Algériens, UGTA) was perceived, the trade union organization was subsumed under FLN control.

Contrary to the intent of the Tripoli Program, Ben Bella saw the FLN as an elite vanguard party that would mobilize popular support for government policies and reinforce his increasingly personal leadership of the country. Because Khider envisioned the FLN as playing a more encompassing, advisory role, Ben Bella forced him from office in April 1963 and replaced him as party secretary general. Khider later absconded with the equivalent of US$12 million in party funds into exile in Switzerland. In August 1963, Abbas resigned as assembly president to protest what he termed the FLN's usurpation of the legislature's authority. He was subsequently put under house arrest. A new constitution drawn up under close FLN supervision was approved by nationwide referendum in September, and Ben Bella was confirmed as the party's choice to lead the country for a five-year term. Under the new constitution, Ben Bella as president combined the functions of chief of state and head of government with that of supreme commander of the armed forces. He formed his government without needing legislative approval and was responsible for the definition and direction of its policies. There was no effective institutional check on its powers.