Cuba–Spain relations refer to the bilateral relations between the Republic of Cuba and the Kingdom of Spain. Relations date back more than five centuries. Cuba had been a colony from 1492 until 1898 when the United States took over the territory in the Spanish–American War. Many Cubans have ancestry dating back from Spain. Many Spaniards escaped the first Spanish Civil War and went to Cuba, and other countries, around 1820–1825.