The Embassy of Mexico in Spain, located in Madrid, is the primary diplomatic mission of the United Mexican States in the Kingdom of Spain. Diplomatic relations between the two countries were established in 1836, 15 years after the Mexican War of Independence, but were severed in 1940 due to Mexico's support for the Second Spanish Republic in the Spanish Civil War. Relations were re-established in 1977 upon Spain's return to democracy following the death of Francisco Franco.