The troubled history of Spanish–American relations has been seen as one of "love and hate". The groundwork was laid by the colonization of parts of the Americas by Spain before 1700. The Spaniards were the first Europeans to establish a permanent settlement in what is now United States territory. The first settlement in modern-day United States territory was San Juan, Puerto Rico, founded in 1521 by Spanish explorer Juan Ponce de León. 35 years later, Spanish admiral Pedro Menéndez de Avilés founded the city of St. Augustine, Spanish Florida (the earliest settlement in the continental United States), which became a small outpost that never grew very large. More permanent, much larger colonies were established in New Mexico and California, with a few in Texas and Arizona, forming part of the colonial history of the United States. Although the Spanish elements in the history of the United States were mostly ignored by American historians in the decades after independence, the concept of the "Spanish borderlands" in the American Southwest was developed by American historians in the 20th century, which integrated Spain into U.S. history.
Spain provided indirect support to the new United States by fighting against Great Britain during the American Revolutionary War. Madrid tacitly recognised the independence of the United States in 1783. The purchase of the underdeveloped Spanish Florida by the US was made effective in 1821. The U.S. gave diplomatic support to the breakaway Spanish colonies as they secured their independence around 1820. American diplomatic offers to buy Cuba in the 1850s failed. When Cuba revolted in the late 19th century American opinion became strongly hostile to Spanish brutality. The Spanish–American War erupted in 1898. The Spanish defeat in the conflict entailed the loss of the last Spanish colonies outside north Africa, notably Cuba, Puerto Rico, Guam and the Philippines.
When the Spanish Civil War erupted in 1936, Washington was neutral and banned arms sales to either side; oil sales were allowed. Congress endorsed the embargo by a near-unanimous vote. President Franklin Roosevelt quietly favored the left-wing Republican (or "Loyalist") government, but intense pressure by American Catholics forced him to maintain a policy of neutrality. Spain was carefully neutral in World War II, despite its ties with Nazi Germany.
As the Cold War deepened after 1950, Washington threw a lifeline to the Francoist dictatorship that included financial aid and military bases. Membership in NATO came in 1982, after Francisco Franco's death and the Spanish transition to democracy.
Spain and the American Revolution
Spain declared war on Great Britain as an ally of the Kingdom of France, and provided supplies and munitions to the Continental Army. However Spain was not an ally of the Patriots. It was reluctant to recognize the independence of the United States, because it distrusted revolutionaries. Historian Thomas A. Bailey says of Spain: Although she was attracted by the prospect of a war [against England] for restitution and revenge, she was repelled by the specter of an independent and powerful American republic. Such a new state might reach over the Alleghenies into the Mississippi Valley and grasp territory that Spain wanted for herself.
Among the most notable Spaniards warriors was Bernardo de Gálvez y Madrid, Count of Gálvez, who defeated the British at Manchac, Baton Rouge, and Natchez in 1779, freeing the lower Mississippi Valley of British forces and relieved the threat to the capital of Spanish Louisiana, New Orleans. In 1780, he recaptured Mobile and in 1781 took by land and by sea Pensacola, leaving the British with no bases in the Gulf of Mexico. In recognition for his actions to the American cause, George Washington took him to his right in the parade of July 4 and the American Confederation Congress cited Gálvez for his aid during the Revolution.
Floridablanca instructed the Count of Aranda to sign a Treaty with the United States on March 17, 1783, thus making Spain tacitly recognise then the independence of the US.
Another notable contributor was Diego de Gardoqui, who was appointed as Spain's first minister to the United States of America in 1784. Gardoqui became well acquainted with Washington, and also marched in President Washington's inaugural parade. King Charles III of Spain continued communications with Washington, sending him gifts such as blooded livestock from Spain that Washington had requested for his farm at Mount Vernon.