In the Spanish-American War (1898), Spain was woefully ill prepared for war against the United States. The one strength Spain had over the US was the number of troops stationed in Cuba. However, the strength of Spain's army in Cuba was quickly made moot by the destruction of the Spanish naval fleet.
It is estimated Spain outnumbered the American invasion force by a margin of 7-to-1. The Spanish Army was also battle tested after fighting the Cuban rebels for the past three years. The US was only marginally more prepared for war than Spain as a whole and supplied the army with substandard provisions. Spain's greatest strength was the larger fighting force with more experience.
Despite Spain's strength in numbers, the war was short and rested mainly on the naval forces. This prevented Spain from re-supplying their forces and using the numbers in a drawn out land war. The end of the war was assured by the destruction of the Spanish Atlantic fleet that sailed out of Santiago de Cuba in early July. With the fleet destroyed, Spain had no option but to surrender Cuba to avoid senseless deaths on each side. The final Treaty of Paris freed Cuba, ceded Guam and Puerto Rico to the US and forced Spain to sell the Philippines for $20 million to the US.