The foreign relations of Spain could be constructed upon the foreign relations of the Hispanic Crown. The personal union of Castile and Aragon that ensued with the joint rule of the Catholic Monarchs was followed by the annexation of the Kingdom of Granada and the Kingdom of Navarre. The crown also built a large colonial empire in the Americas after the arrival of Columbus to the New World in 1492.
The Spanish Habsburg monarchs had large holdings across the European continent stemming from the inherited dominions of the Habsburg monarchy and from the Aragonese holdings in the Italian Peninsula. The Habsburg dynasty fought against the Protestant Reformation in the continent and achieved a dynastic unification of the realms of the Iberian Peninsula with their enthronement as Portuguese monarchs after 1580. The American colonies shipped bullion, but resources were spent in wars waged against France in Italy and elsewhere as well as in conflicts against the Ottoman Empire, England or revolts in the Spanish Netherlands, Portugal (lost after 1640) and Catalonia. Mainland Spain was the main theatre of the War of Spanish Succession (1701–1714), after which the Bourbon dynasty consolidated rule, while handing in holdings in Italy and the Netherlands. The successive Bourbon Family Compacts underpinned a close alignment with the Kingdom of France throughout the 18th century. During the Napoleonic Wars, Mainland Spain was occupied by the French Empire (which installed a puppet ruler), and became after an 1808 uprising the main theatre of the Peninsular War. Nearly all its colonies fought for and won independence in the early 19th century. From then on it kept Cuba, Puerto Rico and the Philippines, otherwise lost in 1898 after the Spanish–American War, and, in line with far-reaching efforts by other European powers, Spain began to sustain a colonial presence in the African continent, most notably in Western Sahara and Equatorial Guinea. It also intervened in Nguyễn Vietnam alongside France and involved in the affairs of former colony Santo Domingo, which briefly returned to Spanish control. In the wake of the creation of a Spanish protectorate in Northern Morocco, the early 20th century saw a draining conflict against Riffian anti-colonial resistance. Spain stuck to a status of neutrality during World War I.
The Spanish Civil War of 1936–1939 became a proxy war between the axis powers Germany and Italy and the Soviet Union (which lost). The war ensued with the installment of a dictatorship under Francisco Franco lasting until 1975. In the aftermath of World War 2, the series of multilateral agreements and institutions configuring what it is known today as Western Europe were made apart from Francoist Spain.[1] The 1953 military agreements with the United States entailed the acceptance of unprecedented conditions vis-à-vis the (peacetime) military installment of a foreign power on Spanish soil.[2] Spain joined the UN in 1955 and the IMF in 1958.[3] In the last rales of the dictator, the mismanaged decolonisation of Spanish Sahara ensued with the Moroccan invasion of the territory in 1975 and the purported partition of it between Morocco and Mauritania, spawning a protracted conflict pitting the Sahrawi national liberation Polisario Front against Morocco and (briefly) Mauritania lasting to this day. Spain joined NATO (1982) and entered the European Communities (1986).
On a wide range of issues, Spain often prefers to coordinate its efforts with its EU partners through the European political cooperation mechanisms. In addition to being represented via EU membership, Spain is a permanently invited guest to all G20 summits.[4]
Spain's peculiar but seemingly secure position within the G20 also appears to have facilitated their greater participation in the G20's work: Spain is the only outreach participant to have made policy commitments comparable to those of G20 members proper at summits since Seoul. Spain therefore appears to have become a de facto member of the G20.