The barbarian invasions and the Visigothic kingdom. The region, which had been prey to the Moorish raids in the 2nd century. AD and of the Franks and Alemannic (257), saw in the 5th century. the invasions of Vandals, Swabians and Alans (409), finally of the Visigoths (415), who however, with King Wallia, accepted to be federated of the empire and, defeating the Silingian vandals and the Alans, abandoned the Spain ‘Aquitaine (418). After the vandals with Genseric in northern Africa in 429, the Romans were able to partially restore their dominion; but it was a dominion by now undermined, both for the revolts of the peasants of the Tarraconense (bagaudi), and for the dynamism of the Swabians, who, extended in the Betica and Carthaginian areas, came to conquer Zaragoza. An intermittent position of defense of imperial rights assumed, in this period, the Visigoths; but they too soon resumed their armed penetration into the South., and towards 470 their king Henry was lord of much of it, with the exception of Galicia and an area of Lusitania, which remained to the Swabians, and some mountainous territories, in Betica and Carthaginian, which remained in the possession of the Spanish-Roman nobility. The Visigothic dominion lasted until 711. Reduced to Spain only due to the defeat of King Alaric II at Vouillé (507) by the Franks of Clovis, the Visigothic kingdom soon had to repel the attack of the Byzantines, which in 554 they had managed to occupy part of the southern Spain and kept it, albeit in ever smaller proportions, until the third decade of the 7th century; but already with the king Leovigildo (568-86) the kingdom had managed to recover. The conquest of the territorial islands that had remained in the power of the indigenous nobility, the repression of the incursions of the Basques, the occupation of the territories remaining in the Swabian kingdom and the definitive collapse of this (585) marked the territorial consolidation of the Visigothic kingdom, which had for capital Toledo. This was joined by the moral strengthening of the state, thanks to the gradual rapprochement between Visigoths and the Spanish-Roman population, to the conversion of King Recaredo (586-601) from Arianism to Catholicism, with the consequent participation of the high clergy in the government (i famous councils of Toledo), and the legislative unification carried out by King Recesvindo (649-72) with the promulgation of a Lex Wisigothorum, which, valid for the two peoples, abolished the traditional duality of rights between losers and winners. The Lex of Recesvindo, designated in subsequent alterations as Liber iudiciorum, can be said to have marked the birth date of Spanish national law. However, the work of consolidation of the state was not entirely successful: the high nobility, mistress of large estates, maintained a high degree of autonomy in the face of royal power. In the last decades of the 7th century. the powerlessness of the royal power to dominate the situation and to keep the high clergy and nobility under control became evident; vain were the attempts of the monarchy to react, even by force (military organization of King Wamba, 672-80, abrogated by his successor Ervige).
The Republic and the civil war. Elections for the Cortes constituents of June 1931 were largely defeated by a coalition of leftist republicans and PSOE and in the Dec. 1931 a Constitution of an advanced social-democratic character was promulgated. Having launched a statute of wide autonomy for Catalonia (1932), the government of the republican M. Azaña tried to limit the weight of the Church and the army in the political life of the country, introduced more advanced labor legislation, but failed to stem rising unemployment or meeting the demand for land from the agricultural proletariat. The legislative elections of 1933 were therefore won by the radical party of A. Lerroux García and by the Confederación española de derechas autónomas (CEDA), a coalition of right-wing parties born on the initiative of JM Gil-Robles. In Oct 1934, against the entry of three CEDA ministers into the Lerroux government, the PSOE proclaimed a general strike, which turned into an armed insurrection in the mining region of Asturias; the latter was fiercely repressed by the army, like the independence movement that broke out in Catalonia for fear that the central government would repeal the statute of autonomy and cancel the land reform law approved by the local Generalitat. The dominance of the right was interrupted in the elections of February. 1936 since the victory of the Frente popular: the cancellation of the reforms carried out until then and the fear of the advent of a fascist-type regime led left-wing republicans, socialists and communists (the Partido comunista de España, PCE, was born in 1922) to create an electoral coalition, which could also count on the tacit support of anarchist organizations (in particular the powerful Confederación nacional de trabajo, CNT, born in 1910). While land occupations by poor peasants multiplied, fires and looting of churches and monasteries, clashes between right-wing paramilitary formations and workers’ organizations, and the new government, made up exclusively of republicans, he launched new reformist and anti-clerical measures, on July 17, 1936 the insurrection of General F. Franco broke out in Morocco, which spread the following day in the motherland; the intervention of armed workers against the military in the main cities prevented the success of the insurgents, who could only take possession of Old Castile, Navarre, Aragon, Galicia and Andalusia. A violent civil war followed (1936-39), during which the insurgents relied on substantial aid in men and materials from Italy and Germany, despite the two countries having formally joined the non-intervention agreements promoted by France and Great Britain., while the legitimate government, in addition to the help of thousands of volunteers who came from all over the world and organized in the International Brigades, could count on the support of the USSR. On the military level, after the failure of a first assault on Madrid (Nov. 1936) and subsequent offensives against the capital (Jarama, Feb. 1937; Guadalajara, March 1937), Franco directed his efforts against the industrial regions of the North, which he managed to subdue by Oct. 1937. The Francoists responded to the victorious republican attack against Teruel (December 1937-January 1938) with the reconquest of the city in February and with an offensive which, having reached the mouth of the Ebro in spring, cut the republican Spain (Catalonia and the Madrid-Mediterranean region). With the fall of Catalonia (Jan. 1939), in the republican camp there was a deep rift between soldiers, in favor of negotiating surrender, and Communists, determined to resist indefinitely, and from 7 March 1939 violent fighting between the army and Communists raged in Madrid.