Why did the Spanish Empire lose all its American colonies in the 1800s if Spain was so powerful?

In the sixteenth century, Spain was the most powerful nation in the world.

It had a strong monarchy and a fearsome military, funded by gold and silver from the American colonies.

Then, like empires throughout history, Spain began to decline. England defeated the Spanish Armada, or naval fleet, in 1588. Endless wars and civil turmoil drained the country of money and manpower.

As vast as Spanish America was by the end of the eighteenth century, it was like a block of houses that is full of rebellious tenants and belongs to an absent landlord only on paper. Spain lacked the money, troops, or will to keep possession of what it claimed. In 1795, the losses began.

In 1588, Spain tried to conquer England with an armada, or fleet, of 130 warships. Aided by favorable weather and superior seamanship, the greatly outnumbered English navy defeated the Spanish Armada.

About 60 Spanish ships were destroyed; no English ships were lost.