Cuba was the last major Spanish colony to gain independence, following a 50-year struggle begun in 1850. US intervention during the Spanish-American War in 1898 assisted the Cubans in overthrowing Spanish rule, and the Treaty of Paris established Cuban independence from the US in 1902. After independence, Cuba was often ruled by military figures who obtained or remained in power by force. In 1959 Fidel Castro led a rebel army to victory, and he declared Cuba a socialist state in 1961. Castro ruled the country for nearly five decades until he stepped down in February 2008 when his younger brother Raul Castro took over as president. The relationship between Cuba and the United States froze in 1959, and in the next three decades Cuba’s economy was characterized by heavy dependence on Soviet assistance, with the Soviet bloc countries providing guaranteed export markets for Cuba's main exports - sugar and nickel. With the disappearance of Soviet aid following the collapse of the USSR, government controls on the economy were relaxed in the 1990s, and major structural changes have expanded the role of the markets. Since the mid-1990s, tourism has surpassed sugar as the primary source of foreign exchange, and in recent years Cuba’s economic growth has accelerated, owing to new export markets and sources of external finance. Since late 2000, Venezuela has been providing Cuba oil on preferential terms, and high metals prices continue to boost Cuban earnings from nickel and cobalt production.