Spain remained neutral throughout World War I between 28 July 1914 and 11 November 1918, and despite domestic economic difficulties, it was considered "one of the most important neutral countries in Europe by 1915". Spain had enjoyed neutrality during the political difficulties of pre-war Europe, and continued its neutrality after the war until the Spanish Civil War began in 1936. While there was no direct military involvement in the war, German forces were interned in Spanish Guinea in late 1915.
The Spanish prime minister, Eduardo Dato, a Conservative, declared neutrality by Royal Decree on 7 August 1914:
"Existent, sadly, the state of war between Austria, Hungary and Serbia [...] the Government of His Majesty believes in the duty to order the strictest neutrality to Spanish subjects."
Dato was applauded for this in the Cortes when they reconvened on 30 October. Opinion among the public was divided. The upper classes (the aristocracy and the rich bourgeoisie), the Catholic Church and the Spanish Army generally favoured the Central Powers, usually identified with Germany. Among political parties, the Germanophile tendency was represented among the reactionary Carlists and the conservative Mauristas, followers of Antonio Maura, who himself favoured closer ties with the Allies because of Spain's 1907 pact with Britain and France, which was designed to head off German colonialism in north Africa. Pro-Allied sentiment, which was generally Francophile, was most common among the middle and professional classes and intellectuals. It was common among Catalan nationalists, Republicans and Socialists. A few Liberals, including Álvaro de Figueroa, leader of the opposition in the Cortes, were also pro-Allied.
Though it remained one of few neutral countries in mainland Europe, Spain was still affected by the conflict in a variety of ways. Spain had believed that by remaining neutral, the nation would potentially benefit by the end of the war and hoped to emerge with significantly-enhanced prestige and power in a postwar Europe. The conflict had some positive effects for the Spanish, particularly in its economy. The Spanish economy, which had previously begun to industrialise, benefited from increased exporting of goods to the belligerent nations, including products such as steel and foodstuffs. Moreover, Spain's gold reserves more than tripled over the course of the war, allowing the government to significantly reduce its debts.
However, Spain also experienced negative impacts resulting from the war. With regard to its economy, the Spanish maritime trade was significantly impacted by German U-Boat campaigns, with an estimated 100 lives and 66 ships lost to the submarines. Though Spanish industry in the north and the east of the country, expanded as demand rose among the warring powers for Spanish goods, the inflow of capital produced inflation and imports dropped, exacerbating the poverty of the rural areas and the south. The growing poverty intensified internal migration to the industrial areas, and the railway system was unable to bear the increased demand. The shortage of basic commodities became known as the crisis de subsistencias. In 1915, food riots erupted in some cities, and in December 1915, the government resigned, to be replaced by a Liberal government under Figueroa.
In July 1916, the two main trade unions, the socialist Unión General de Trabajadores and the anarchosyndicalist Confederación Nacional del Trabajo, joined forces to put pressure on the Liberal government. In March 1917, they even threatened to start a general strike. Their example inspired military officers to form unions of their own, the juntas de defensa. The officers' goal was to prevent the passage of the Bill of Military Reform tabled in the Cortes in 1916, that sought to professionalise the military by introducing intellectual and physical tests as prerequisites for promotions; the ultimate goal being a reduction in the size of the bloated officers corps. The juntas de defensa demanded promotions and pay increases based strictly on seniority.
The war also had a significant impact on the construction program of the Spanish Navy. The second and third España-class battleships, built in Spain between 1910 and 1919, were delayed significantly because of material shortages from Britain. Most importantly, the main battery guns for Jaime I did not arrive until 1919, after the war had ended. The projected Reina Victoria Eugenia-class battleships, which also would have relied heavily on imported guns and armour plate, were cancelled outright after the war started.
Also significant were the social impacts of the war. Though Spain as a whole was neutral throughout the war, the conflict split the country into groups of 'Francophiles' and 'Germanophiles' who each sympathised with the opposing Entente and Central Powers, the rift being only deepened by the ongoing U-Boat campaign which continued to impact Spanish ships. The Spanish public also became aware of the harsh realities of the war itself by contact with a migratory influx of approximately 10,000 Spanish workers who returned home from Belgium, France and Germany.
Spanish journalists also acted as war correspondents near the battlefront, keeping the public informed with regard to the conflict and conditions, with opposing viewpoints in these reports often also contributing to the varying sympathies of the country and the divide as a whole.
As early as August 1914, some Spaniards were volunteering in the French Army, mainly the Foreign Legion. In 1915, they founded their own magazine, Iberia, to defend and propagate their cause. In February 1916, the Comitè de Germanor (Committee of Brotherhood) was set up in Barcelona to recruit for the Legion. Over 2,000 Spaniards ultimately served in the Legion. King Alfonso XIII also tried to help in the war by creating the European War Office.
In 1916, the Fernando Po Affair threatened Spanish neutrality. British, French and Belgian forces had occupied German Cameroon, forcing 6,000 Schutztruppe (indigenous colonial troops led by German officers) to retreat into neighbouring Spanish Guinea. While formally interned on the island of Fernando Po, this formidable force of well-disciplined troops continued to drill and train under German control. Perceiving an ongoing threat to their own African possessions, the Allies threatened to invade the Spanish colony. The Spanish Government was able to defuse the situation by transferring the German officers to Spain itself while the African Schutztruppe remained on Fernando Po until the Armistice of 11 November 1918.
|volume=has extra text (help)