Anarchism in Morocco has its roots in the federalism practiced by Amazigh communities in pre-colonial Morocco. During the Spanish Civil War, Moroccan nationalists formed connections with Spanish anarchists in an attempt to ignite a war of national liberation against Spanish colonialism, but this effort was not successful. Despite the brief establishment of an anarchist movement in post-war Morocco, the movement was suppressed by the newly independent government, before finally reemerging in the 21st century.