Spanish-American war was fought from April 1898 to August 1898, as a result of Actions taken bu USA to end the Spanish oppressive rule over Cuba. This war was won by USA and a treaty was signed in December 1898.
According to this treaty Spain gave up its control over Cuba. Also Spain Ceded Guam, Puerto, Rico and Philippines islands to USA. In Return USA paid 20 million US dollars to Spain for Philippines. Although as per the treaty Cuba became an independent country, USA retained considerable control over its foreign policy.
Spanish-American war marked emergence of USA as an important world power. It also highlighted the need for link between Caribbean Sea and Pacific Ocean, which led to subsequent building of Panama canal.