Does the sentence "After the death of the king Ferdinand VII, in 1833, only Cuba and Puerto Rico remained under Spanish rule, until the SpanishAmerican War in 1898." provide a valid answer to the question "When did the Spanish-American war occur?"
yes